From b8250b67c963f97134487c82a5849666747290c8 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 3 Apr 2021 13:58:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B0=20webpack=205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../renderer-lyric/webpack.config.prod.js | 1 - build-config/renderer/webpack.config.prod.js | 1 - build-config/utils.js | 16 +- package-lock.json | 5555 ++++++++--------- package.json | 31 +- src/main/index.js | 2 +- 6 files changed, 2526 insertions(+), 3080 deletions(-) diff --git a/build-config/renderer-lyric/webpack.config.prod.js b/build-config/renderer-lyric/webpack.config.prod.js index 8cc3d8dd..e9e9f7be 100644 --- a/build-config/renderer-lyric/webpack.config.prod.js +++ b/build-config/renderer-lyric/webpack.config.prod.js @@ -34,7 +34,6 @@ module.exports = merge(baseConfig, { }), ], optimization: { - chunkIds: 'named', minimizer: [ new TerserPlugin(), new OptimizeCSSAssetsPlugin({}), diff --git a/build-config/renderer/webpack.config.prod.js b/build-config/renderer/webpack.config.prod.js index 8cc3d8dd..e9e9f7be 100644 --- a/build-config/renderer/webpack.config.prod.js +++ b/build-config/renderer/webpack.config.prod.js @@ -34,7 +34,6 @@ module.exports = merge(baseConfig, { }), ], optimization: { - chunkIds: 'named', minimizer: [ new TerserPlugin(), new OptimizeCSSAssetsPlugin({}), diff --git a/build-config/utils.js b/build-config/utils.js index e3a9b5e0..136b2e50 100644 --- a/build-config/utils.js +++ b/build-config/utils.js @@ -2,8 +2,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin') const cssLoaderConfig = require('./css-loader.config') const chalk = require('chalk') -const isDev = process.env.NODE_ENV === 'development' - // merge css-loader exports.mergeCSSLoader = beforeLoader => { const loader = [ @@ -11,12 +9,7 @@ exports.mergeCSSLoader = beforeLoader => { { resourceQuery: /module/, use: [ - { - loader: MiniCssExtractPlugin.loader, - options: { - hmr: isDev, - }, - }, + MiniCssExtractPlugin.loader, { loader: 'css-loader', options: cssLoaderConfig, @@ -27,12 +20,7 @@ exports.mergeCSSLoader = beforeLoader => { // 这里匹配普通的 `