From a0030fcf2df5387577ced165198f1f0264022fbd Mon Sep 17 00:00:00 2001 From: Jonny Buchanan Date: Fri, 6 Oct 2017 10:02:32 +1000 Subject: [PATCH] Update style-loader and disable inclusion of its HMR code in builds (#3236) --- packages/react-scripts/config/webpack.config.prod.js | 7 ++++++- packages/react-scripts/package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index ef4ea1bc076..124d5b3cbeb 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -197,7 +197,12 @@ module.exports = { loader: ExtractTextPlugin.extract( Object.assign( { - fallback: require.resolve('style-loader'), + fallback: { + loader: require.resolve('style-loader'), + options: { + hmr: false, + }, + }, use: [ { loader: require.resolve('css-loader'), diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 1d8ef515b2f..f5007fbe635 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -49,7 +49,7 @@ "postcss-loader": "2.0.6", "promise": "8.0.1", "react-dev-utils": "^4.1.0", - "style-loader": "0.18.2", + "style-loader": "0.19.0", "sw-precache-webpack-plugin": "0.11.4", "url-loader": "0.6.2", "webpack": "3.5.1",