update webpack to 5

This commit is contained in:
byte[] 2021-03-21 12:34:33 -04:00
parent ba900f4ad6
commit d375691437
3 changed files with 570 additions and 992 deletions

1546
assets/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,7 @@
"watch": "webpack --watch" "watch": "webpack --watch"
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^5.15.2", "@fortawesome/fontawesome-free": "^5.15.3",
"brunch": "^3.0.0", "brunch": "^3.0.0",
"copycat-brunch": "^1.1.1" "copycat-brunch": "^1.1.1"
}, },
@ -14,14 +14,14 @@
"copy-webpack-plugin": "^6.4.1", "copy-webpack-plugin": "^6.4.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"css-minimizer-webpack-plugin": "^1.3.0",
"extract-loader": "^5.1.0", "extract-loader": "^5.1.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"normalize-scss": "^7.0.1", "normalize-scss": "^7.0.1",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"postcss-scss": "^2.1.1", "postcss-scss": "^2.1.1",
"rollup": "^2.41.0", "rollup": "^2.42.1",
"rollup-plugin-buble": "^0.19.8", "rollup-plugin-buble": "^0.19.8",
"rollup-plugin-includepaths": "^0.2.4", "rollup-plugin-includepaths": "^0.2.4",
"rollup-plugin-multi-entry": "^2.1.0", "rollup-plugin-multi-entry": "^2.1.0",
@ -30,7 +30,7 @@
"source-map-support": "^0.5.19", "source-map-support": "^0.5.19",
"style-loader": "^1.3.0", "style-loader": "^1.3.0",
"terser-webpack-plugin": "^3.1.0", "terser-webpack-plugin": "^3.1.0",
"webpack": "^4.46.0", "webpack": "^5.27.1",
"webpack-cli": "^3.3.12", "webpack-cli": "^3.3.12",
"webpack-rollup-loader": "^0.8.0" "webpack-rollup-loader": "^0.8.0"
} }

View file

@ -1,6 +1,6 @@
const path = require('path'); const path = require('path');
const TerserPlugin = require('terser-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin'); const CopyPlugin = require('copy-webpack-plugin');
const isDevelopment = process.env.NODE_ENV !== 'production'; const isDevelopment = process.env.NODE_ENV !== 'production';
@ -23,11 +23,7 @@ if (!isDevelopment){
parallel: true, parallel: true,
sourceMap: isDevelopment, sourceMap: isDevelopment,
}), }),
new OptimizeCSSAssetsPlugin({ new CssMinimizerPlugin(),
cssProcessorOptions: { discardComments: { removeAll: true } },
canPrint: true,
sourceMaps: isDevelopment,
}),
]); ]);
} }