From 840ccb4bdfa3751217a7b41726b3e8f11db229bb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 6 Mar 2019 11:16:07 +0000 Subject: [PATCH] chore(deps): update dependency extract-css-chunks-webpack-plugin to v4 (#5160) Co-authored-by: Renovate Bot Co-authored-by: Xin Du (Clark) --- packages/webpack/package.json | 2 +- packages/webpack/src/config/base.js | 4 +--- packages/webpack/src/utils/style-loader.js | 8 +++++++- yarn.lock | 10 +++++----- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/webpack/package.json b/packages/webpack/package.json index bacb81e4fc..ccca001455 100644 --- a/packages/webpack/package.json +++ b/packages/webpack/package.json @@ -21,7 +21,7 @@ "css-loader": "^2.1.0", "cssnano": "^4.1.10", "eventsource-polyfill": "^0.9.6", - "extract-css-chunks-webpack-plugin": "^3.3.3", + "extract-css-chunks-webpack-plugin": "^4.0.0", "file-loader": "^3.0.1", "fs-extra": "^7.0.1", "glob": "^7.1.3", diff --git a/packages/webpack/src/config/base.js b/packages/webpack/src/config/base.js index ee079da564..7e18bc6047 100644 --- a/packages/webpack/src/config/base.js +++ b/packages/webpack/src/config/base.js @@ -347,9 +347,7 @@ export default class WebpackBaseConfig { if (buildOptions.extractCSS) { plugins.push(new ExtractCssChunksPlugin(Object.assign({ filename: this.getFileName('css'), - chunkFilename: this.getFileName('css'), - // TODO: https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/issues/132 - reloadAll: true + chunkFilename: this.getFileName('css') }, buildOptions.extractCSS))) } diff --git a/packages/webpack/src/utils/style-loader.js b/packages/webpack/src/utils/style-loader.js index b6fb589f1c..a9265c6ee1 100644 --- a/packages/webpack/src/utils/style-loader.js +++ b/packages/webpack/src/utils/style-loader.js @@ -84,7 +84,13 @@ export default class StyleLoader { extract() { if (this.extractCSS) { - return ExtractCssChunksPlugin.loader + return { + loader: ExtractCssChunksPlugin.loader, + options: { + // TODO: https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/issues/132 + reloadAll: true + } + } } } diff --git a/yarn.lock b/yarn.lock index be170b7dc5..d6261017e7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4575,14 +4575,14 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-css-chunks-webpack-plugin@^3.3.3: - version "3.3.3" - resolved "https://registry.npmjs.org/extract-css-chunks-webpack-plugin/-/extract-css-chunks-webpack-plugin-3.3.3.tgz#d550be32b93dad5d290e9d979d37dd317bdaec9b" - integrity sha512-4DYo3jna9ov81rdKtE1U2cirb3ERoWhHldzRxZWx3Q5i5Dm6U+mmfon7PmaKDuh6+xySVOqtlXrZyJY2V4tc+g== +extract-css-chunks-webpack-plugin@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/extract-css-chunks-webpack-plugin/-/extract-css-chunks-webpack-plugin-4.0.0.tgz#8a7dcbfa7ae7f399571a4246813d846062b0ed09" + integrity sha512-6wddkm9BJtFshHTA/vv7SKzXdyTXnyRxSceoeGDHdTngNoYARDtLcQfJL8gz6WBOtwvYsTEc+AuEgWEb/VaKCw== dependencies: loader-utils "^1.1.0" lodash "^4.17.11" - normalize-url "^3.3.0" + normalize-url "^3.0.0" schema-utils "^1.0.0" webpack-sources "^1.1.0"