ulogger-server/webpack.prod.js

38 lines
750 B
JavaScript
Raw Normal View History

2020-08-29 14:33:08 +02:00
const { merge } = require('webpack-merge');
2019-11-29 16:53:50 +01:00
const common = require('./webpack.common.js');
const TerserPlugin = require('terser-webpack-plugin');
2019-11-29 16:53:50 +01:00
module.exports = merge(common, {
mode: 'production',
2019-12-19 23:04:12 +01:00
devtool: 'source-map',
optimization: {
minimizer: [
new TerserPlugin({
parallel: true,
terserOptions: {
compress: {
pure_funcs: [ 'console.log' ]
2020-01-11 16:15:22 +01:00
},
output: {
2020-08-29 14:33:08 +02:00
comments: false
}
2020-01-11 16:15:22 +01:00
},
extractComments: false
})
]
},
2019-11-29 16:53:50 +01:00
module: {
rules: [
{
test: /\.js$/,
use: {
loader: 'babel-loader',
options: {
presets: [ '@babel/preset-env' ]
}
}
}
]
}
});