You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WebCAD/config/webpack.prod.ts

42 lines
1.3 KiB

import * as webpack from 'webpack';
import * as merge from 'webpack-merge';
import common from './webpack.common';
import UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const config: webpack.Configuration = merge(
common,
{
mode: "production",
devtool: "source-map",
optimization: {
minimizer: [
new UglifyJSPlugin(
{
sourceMap: true,
cache: true,
extractComments: true,
parallel: true,
uglifyOptions: {
output: {
beautify: false,
},
// mangle: {
// properties: {
// // mangle property options
// // keep_quoted: true 混淆属性
// debug: true //因为混淆了THREE库导致的错误.
// }
// },
keep_classnames: true,
toplevel: true,
},
}
)
]
}
}
);
export default config;