2022-01-15 15:52:21 +00:00
|
|
|
const { merge } = require("webpack-merge");
|
|
|
|
const common = require("./webpack.common");
|
2022-01-17 10:17:21 +00:00
|
|
|
const ImageMinimizerPlugin = require("image-minimizer-webpack-plugin");
|
2022-01-15 15:52:21 +00:00
|
|
|
|
|
|
|
let config = {
|
2022-01-17 10:17:21 +00:00
|
|
|
mode: "production",
|
|
|
|
optimization: {
|
|
|
|
minimize: true,
|
|
|
|
usedExports: true,
|
|
|
|
minimizer: [
|
|
|
|
new ImageMinimizerPlugin({
|
|
|
|
minimizer: {
|
|
|
|
implementation: ImageMinimizerPlugin.squooshMinify,
|
|
|
|
options: {
|
|
|
|
encodeOptions: {
|
|
|
|
pngquant: {
|
|
|
|
strip: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2022-01-15 15:52:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = merge(common, config);
|