Skip to content
This repository was archived by the owner on Oct 19, 2022. It is now read-only.

Commit 6c6b2e6

Browse files
jedrzejiwanickiDominik Rowicki
authored and
Dominik Rowicki
committed
Optional allChunks to create css bundle from all chunks (#49)
* add flag to bludle css from multiple chunks * fix whitespace
1 parent d1d49ab commit 6c6b2e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,9 @@ module.exports = {
329329
// Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
330330
new ExtractTextPlugin({
331331
filename: cssFilename,
332+
// In case of using code splitting, async bundles still use style loader. Set this
333+
// flag to true to create main css bundle
334+
allChunks: process.env.EXTRACT_CSS_FROM_ALL_CHUNKS === 'true',
332335
}),
333336
// Generate a manifest file which contains a mapping of all asset filenames
334337
// to their corresponding output file so that tools can pick it up without

0 commit comments

Comments
 (0)