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

37 lines
1.0 KiB

import { CleanWebpackPlugin } from "clean-webpack-plugin";
3 years ago
import TerserPlugin from 'terser-webpack-plugin';
import * as webpack from 'webpack';
import { merge } from 'webpack-merge';
import common from './webpack.common';
const config: webpack.Configuration = merge(
common,
{
mode: "production",
devtool: "source-map",
entry: {
shareview: "./src/Add-on/ShareView/ShareViewEntry",
},
optimization: {
minimizer: [
new TerserPlugin({
parallel: true,
terserOptions: {
ecma: 2020,
sourceMap: true,
keep_classnames: true,
}
}),
]
},
5 years ago
plugins: [
new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: ["*.main.js*", "*.shareview.js*", "*.worker.js*", "*.wasm", "*.LICENSE.txt"]
}),
5 years ago
]
}
);
export default config;