Skip to content

Commit 5bcf914

Browse files
committed
render error should fail the command
1 parent 86d4055 commit 5bcf914

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: lib/build.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ module.exports = async function build (sourceDir, cliOptions = {}) {
149149
html = await renderer.renderToString(context)
150150
} catch (e) {
151151
console.error(chalk.red(`Error rendering ${pagePath}:`))
152-
console.error(e.stack)
153-
return
152+
throw e
154153
}
155154
const filename = pagePath.replace(/\/$/, '/index.html').replace(/^\//, '')
156155
const filePath = path.resolve(outDir, filename)

0 commit comments

Comments
 (0)