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

35 lines
936 B

import * as webpack from 'webpack';
import * as merge from 'webpack-merge';
import common from './webpack.common';
import * as AddAssetHtmlPlugin from "add-asset-html-webpack-plugin";
import TerserPlugin = require('terser-webpack-plugin');
const config: webpack.Configuration = merge(
common,
{
mode: "production",
devtool: "source-map",
optimization: {
minimizer: [
new TerserPlugin({
cache: true,
parallel: true,
sourceMap: true,
terserOptions: {
ecma: 7,
sourceMap: true,
keep_classnames: true,
}
}),
]
},
plugins: [
new AddAssetHtmlPlugin([{ filepath: "./node_modules/three/build/three.min.js" }])
]
}
);
export default config;