Skip to content

Commit 782f506

Browse files
author
Josh Estus
committed
make config produce one build file
1 parent f13fa1d commit 782f506

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/react-scripts/scripts/build-component.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
6262
// Generate configuration
6363
const config = configFactory('production');
6464

65+
config.optimization.runtimeChunk = false;
66+
config.optimization.splitChunks = {
67+
cacheGroups: {
68+
default: false,
69+
},
70+
};
71+
config.output.filename = 'main.js';
72+
6573
// We require that you explicitly set browsers and do not fall back to
6674
// browserslist defaults.
6775
const { checkBrowsers } = require('react-dev-utils/browsersHelper');

0 commit comments

Comments
 (0)