something something git

This commit is contained in:
peter
2019-08-20 00:34:24 +02:00
parent 940f2f439d
commit 79c832e463
5 changed files with 202 additions and 52 deletions
+47
View File
@@ -0,0 +1,47 @@
const TerserPlugin = require('terser-webpack-plugin');
const path = require('path');
module.exports = {
optimization: {
minimize: false
},
mode: 'production',
target: "node",
entry: path.resolve(__dirname, '../../dist/FrontblockLib.js'),
output: {
path: path.resolve(__dirname, '../../dist'),
filename: 'FrontblockLib.js',
libraryTarget: 'commonjs',
},
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
}
}
}
}
}