From bb3452b329c795e1a3c822298f88a3efb4494d24 Mon Sep 17 00:00:00 2001 From: jedrzejiwanicki Date: Mon, 6 Aug 2018 15:09:04 +0200 Subject: [PATCH 1/2] add flag to bludle css from multiple chunks --- packages/react-scripts/config/webpack.config.prod.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 5c1ce01fc38..38e5402a275 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -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 From 5a6dfccb1e68a66ec7b93749340295fbd5ce2934 Mon Sep 17 00:00:00 2001 From: jedrzejiwanicki Date: Mon, 6 Aug 2018 15:19:09 +0200 Subject: [PATCH 2/2] fix whitespace --- packages/react-scripts/config/webpack.config.prod.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 38e5402a275..c0d2c6064e9 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -329,9 +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', + // 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