Files
王立帮 f4bcc9166c Revert "update examples"
This reverts commit af3e64a06d.
2025-03-09 10:50:41 +08:00

27 lines
831 B
JavaScript

const path = require("path");
const common = require("./webpack.common");
const { merge } = require("webpack-merge");
const TerserPlugin = require("terser-webpack-plugin");
var HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = merge(common, {
mode: "production",
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
extractComments: false,
}),
new HtmlWebpackPlugin({
inject: false,
template: path.resolve(process.cwd(), 'template.xml'),
filename: 'index.xml',
minify: {
removeAttributeQuotes: true,
collapseWhitespace: true,
removeComments: true,
}
})
]
}
});