diff --git a/webpack/webpack.aot-common.js b/webpack/webpack.aot-common.js
index 6d233d391b1f3464e78ce21dfa7b5f10887e4636..6c98c2f7cec402bdf5868eeaeec3db463ca331c8 100644
--- a/webpack/webpack.aot-common.js
+++ b/webpack/webpack.aot-common.js
@@ -50,9 +50,11 @@ const outputPath = path.resolve(__dirname,'../dist/aot')
 compileQuickOnePager()
   .then(html => {
     const fs = require('fs')
-    fs.writeFile(path.join(outputPath, 'quickstart.html'), html, 'utf-8', (err) => {
-      if (err) throw new Error(`quickOnePager cannot be written to disk`)
-    })
+    const { execSync } = require('child_process')
+    const { promisify } = require('util')
+    const asyncWrite = promisify(fs.writeFile)
+    execSync(`mkdir -p ${outputPath}`)
+    return asyncWrite(path.join(outputPath, 'quickstart.html'), html, 'utf-8')
   })
   .catch(e => {
     console.warn(e)