Skip to content

Commit

Permalink
including polyfills in production build (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Hamlin authored and jaredpalmer committed Mar 31, 2018
1 parent e0b645d commit 8ec8d16
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/razzle/config/createConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,15 @@ module.exports = (
// runtimeChunk: true,
};
} else {
// Specify production entry point (just /client/index.js)
// Specify production entry point (/client/index.js)
config.entry = {
client: [paths.appClientIndexJs],
client: [
// We ship a few polyfills by default but only include them if React is being placed in
// the default path. If you are doing some vendor bundling, you'll need to require the razzle/polyfills
// on your own.
!!dotenv.raw.REACT_BUNDLE_PATH && require.resolve('./polyfills'),
paths.appClientIndexJs
],
};

// Specify the client output directory and paths. Notice that we have
Expand Down

0 comments on commit 8ec8d16

Please sign in to comment.