Skip to content

Commit

Permalink
feat: upgrade to webpack 5 (strimzi#79)
Browse files Browse the repository at this point in the history
* move all webpack dependencies and babel to devDependencies
* upgrade all webpack dependencies to latest version
* switch to webpack serve
* switch to css-mimimizer-webpack-plugin from optimize-css-assets-webpack-plugin as suggested by optimize-css-assets-webpack-plugin maintainers

Signed-off-by: Pete Muir <[email protected]>
  • Loading branch information
pmuir authored Dec 9, 2020
1 parent a4c0f81 commit 087cdc3
Show file tree
Hide file tree
Showing 3 changed files with 1,402 additions and 595 deletions.
6 changes: 3 additions & 3 deletions build/webpack.client.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// client production specific plugins and webpack configuration
const TerserPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const CSSMinimizerWebpackPlugin = require('css-minimizer-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
const { BannerPlugin } = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
Expand Down Expand Up @@ -69,7 +69,7 @@ const prodSpecificConfig = {
},
},
}),
new OptimizeCSSAssetsPlugin({}),
new CSSMinimizerWebpackPlugin({}),
],
splitChunks: {
chunks: 'all',
Expand All @@ -93,7 +93,7 @@ const prodSpecificConfig = {
// gzip compress all built js output
new CompressionPlugin({
test: /\\*\.js$/, // apply only on js files
filename: '[path].gz[query]', // output file name
filename: '[path][base].gz[query]', // output file name
algorithm: 'gzip', // compress via gzip
threshold: 0, // applies to all files
minRatio: 0.8, // keep compressed file if smaller by this %
Expand Down
Loading

0 comments on commit 087cdc3

Please sign in to comment.