fix
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
const path = require('path');
|
||||
|
||||
|
||||
const FrontblockLib = {
|
||||
mode: 'production',
|
||||
entry: path.resolve(__dirname, '../../../lib/FrontblockLib.js'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../../../static'),
|
||||
filename: 'FrontblockLib.js',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{ test: /\FrontblockLib.ts/, use: 'ts-loader' }
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [new TerserPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
terserOptions:{
|
||||
mangle: false,
|
||||
keep_classnames: true
|
||||
}
|
||||
})],
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
common: {
|
||||
chunks: 'all',
|
||||
minChunks: 2,
|
||||
maxInitialRequests: 5,
|
||||
minSize: 0,
|
||||
name: 'common'
|
||||
},
|
||||
vendor: {
|
||||
test: /node_modules/,
|
||||
chunks: 'all',
|
||||
name: 'vendor',
|
||||
priority: 10,
|
||||
enforce: true,
|
||||
minChunks: 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module.exports = [
|
||||
//Object.assign({}, angularPage),
|
||||
Object.assign({}, FrontblockLib),
|
||||
];
|
||||
Reference in New Issue
Block a user