Skip to content

Commit

Permalink
render error should fail the command
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 15, 2018
1 parent 86d4055 commit 5bcf914
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5bcf914

Please sign in to comment.