diff --git a/package.json b/package.json index a5e7334b..19900d80 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "eslint-plugin-vue": "7.0.1", "fuzzy": "0.1.3", "husky": "4.3.0", - "mini-css-extract-plugin": "0.11.2", + "mini-css-extract-plugin": "1.0.0", "mocha": "8.1.3", "mousetrap": "1.6.5", "normalize.css": "8.0.1", diff --git a/src/plugins/dev-server.js b/src/plugins/dev-server.js index 8dd4d755..1da841e8 100644 --- a/src/plugins/dev-server.js +++ b/src/plugins/dev-server.js @@ -13,19 +13,6 @@ module.exports = (app) => { "webpack-hot-middleware/client?path=storage/__webpack_hmr" ); - // Enable hot module reload support in mini-css-extract-plugin - for (const rule of webpackConfig.module.rules) { - if (!Array.isArray(rule.use)) { - continue; - } - - for (const use of rule.use) { - if (use.options && typeof use.options.hmr !== "undefined") { - use.options.hmr = true; - } - } - } - const compiler = webpack(webpackConfig); app.use( diff --git a/webpack.config.js b/webpack.config.js index 9b0f764a..4475e52d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -41,7 +41,7 @@ const config = { { loader: MiniCssExtractPlugin.loader, options: { - hmr: false, + esModule: false, }, }, { diff --git a/yarn.lock b/yarn.lock index 69a614f5..a02ea364 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5722,14 +5722,14 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -mini-css-extract-plugin@0.11.2: - version "0.11.2" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.11.2.tgz#e3af4d5e04fbcaaf11838ab230510073060b37bf" - integrity sha512-h2LknfX4U1kScXxH8xE9LCOqT5B+068EAj36qicMb8l4dqdJoyHcmWmpd+ueyZfgu/POvIn+teoUnTtei2ikug== +mini-css-extract-plugin@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-1.0.0.tgz#4afb39f3d97b1b92eacb1ac45025416089f831bd" + integrity sha512-IsmrPv1nkdSUtFCDrAsuv5kg0k/27sLxfXqSz8vLjnbRKrNgoRdQrUNA4MppawvD+GHLkNP6L1P93Bw50ALkbg== dependencies: - loader-utils "^1.1.0" + loader-utils "^2.0.0" normalize-url "1.9.1" - schema-utils "^1.0.0" + schema-utils "^3.0.0" webpack-sources "^1.1.0" minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: