Skip to content

Commit 33cf366

Browse files
committed
Ensure that chunks do not emit assets to the same filename in development mode
1 parent b984ee4 commit 33cf366

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react-scripts/config/webpack.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ module.exports = function(webpackEnv) {
180180
// In development, it does not produce real files.
181181
filename: isEnvProduction
182182
? 'static/js/[name].[contenthash:8].js'
183-
: isEnvDevelopment && 'static/js/bundle.js',
183+
: // error Error: Conflict: Multiple chunks emit assets to the same filename static/js/bundle.js
184+
// (chunks main and vendors-node_modules_chalk_index_js-node_modules_css-loader_dist_runtime_api_js-node_modules_-5ede04)
185+
isEnvDevelopment && 'static/js/[name].js',
184186
// Webpack 5 Change: removal of `futureEmitAssets` which is the default in Webpack 5.
185187
// See https://github.com/facebook/create-react-app/pull/6696#issue-263094759
186188
// futureEmitAssets: true,

0 commit comments

Comments
 (0)