diff --git a/lib/build.js b/lib/build.js index 80a5577abc..73edb45afa 100644 --- a/lib/build.js +++ b/lib/build.js @@ -149,8 +149,7 @@ module.exports = async function build (sourceDir, cliOptions = {}) { html = await renderer.renderToString(context) } catch (e) { console.error(chalk.red(`Error rendering ${pagePath}:`)) - console.error(e.stack) - return + throw e } const filename = pagePath.replace(/\/$/, '/index.html').replace(/^\//, '') const filePath = path.resolve(outDir, filename)