ulogger-server/webpack.prod.js
2020-08-29 19:48:44 +02:00

40 lines
796 B
JavaScript

const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
optimization: {
minimizer: [
new TerserPlugin({
cache: true,
parallel: true,
sourceMap: true,
terserOptions: {
compress: {
pure_funcs: [ 'console.log' ]
},
output: {
comments: false
}
},
extractComments: false
})
]
},
module: {
rules: [
{
test: /\.js$/,
use: {
loader: 'babel-loader',
options: {
presets: [ '@babel/preset-env' ]
}
}
}
]
}
});