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

Optional allChunks to create css bundle from all chunks #49

Merged
merged 2 commits into from
Aug 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ module.exports = {
// Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
new ExtractTextPlugin({
filename: cssFilename,
// In case of using code splitting, async bundles still use style loader. Set this
// flag to true to create main css bundle
allChunks: process.env.EXTRACT_CSS_FROM_ALL_CHUNKS === 'true',
}),
// Generate a manifest file which contains a mapping of all asset filenames
// to their corresponding output file so that tools can pick it up without
Expand Down