We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0b645d commit 8ec8d16Copy full SHA for 8ec8d16
1 file changed
packages/razzle/config/createConfig.js
@@ -434,9 +434,15 @@ module.exports = (
434
// runtimeChunk: true,
435
};
436
} else {
437
- // Specify production entry point (just /client/index.js)
+ // Specify production entry point (/client/index.js)
438
config.entry = {
439
- client: [paths.appClientIndexJs],
+ client: [
440
+ // We ship a few polyfills by default but only include them if React is being placed in
441
+ // the default path. If you are doing some vendor bundling, you'll need to require the razzle/polyfills
442
+ // on your own.
443
+ !!dotenv.raw.REACT_BUNDLE_PATH && require.resolve('./polyfills'),
444
+ paths.appClientIndexJs
445
+ ],
446
447
448
// Specify the client output directory and paths. Notice that we have
0 commit comments