Move to webpack 5
We don't need to explicitly mention TerserJSPlugin any more (from commit
6b8611), as webpack 5 can now extend the `minimizer:` list with the
special `...` syntax.
This gets rid of several `npm install` warnings:
deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
as well as 10 MB of node_modules.
This commit is contained in:
parent
45b8c2a45a
commit
c52136c051
2 changed files with 6 additions and 8 deletions
|
|
@ -3,8 +3,7 @@ const childProcess = require('child_process');
|
|||
|
||||
const copy = require("copy-webpack-plugin");
|
||||
const extract = require("mini-css-extract-plugin");
|
||||
const TerserJSPlugin = require('terser-webpack-plugin');
|
||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||
const CompressionPlugin = require("compression-webpack-plugin");
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
const CockpitPoPlugin = require("./src/lib/cockpit-po-plugin");
|
||||
|
|
@ -70,7 +69,7 @@ module.exports = {
|
|||
|
||||
optimization: {
|
||||
minimize: production,
|
||||
minimizer: [new TerserJSPlugin({}), new OptimizeCSSAssetsPlugin({})],
|
||||
minimizer: [`...`, new CssMinimizerPlugin()],
|
||||
},
|
||||
|
||||
module: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue