merge with old webpack.conf from admin

This commit is contained in:
Daniel Hübleitner
2019-07-28 12:51:35 +02:00
parent 1926e255c3
commit f91ad84664
+46 -2
View File
@@ -13,7 +13,8 @@ const TEMPLATE_FILE = path.resolve(APP_PATH, 'index.html');
const BUILD_PATH = path.resolve(ROOT_PATH, './static');
const staticFiles = {
const staticFiles = [
{
mode: 'production',
entry: {
app: ENTRY_FILE,
@@ -133,7 +134,50 @@ const staticFiles = {
'@': APP_PATH,
}
}
};
},
{
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
}
}
}
}
}
]
const plugin = {
target: "node",