Skip to content

Commit

Permalink
fix puppeteer failure on netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenOutman committed Jun 13, 2018
1 parent f70c0ee commit a353233
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build/webpack.prod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const webpackConfig = merge(baseWebpackConfig, {
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
minChunks(module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
Expand Down Expand Up @@ -122,13 +122,17 @@ const webpackConfig = merge(baseWebpackConfig, {
// prerender spa
new PrerenderSPAPlugin({
staticDir: path.join(__dirname, '../dist'),
routes: [ '/react-vs-vue' ],
routes: ['/react-vs-vue'],

renderer: new Renderer({
inject: {
headless: true
},
headless: false,
// @see https://github.com/chrisvfritz/prerender-spa-plugin/issues/200#issuecomment-391204354
// REMOVED headless: false,

// @see https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#chrome-headless-fails-due-to-sandbox-issues
args: ['--no-sandbox', '--disable-setuid-sandbox'],
renderAfterDocumentEvent: 'render-event'
})
})
Expand Down

0 comments on commit a353233

Please sign in to comment.