ulogger-server/webpack.prod.js

36 lines
699 B
JavaScript
Raw Normal View History

2019-11-29 16:53:50 +01:00
const merge = require('webpack-merge');
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({
cache: true,
parallel: true,
sourceMap: true,
terserOptions: {
compress: {
pure_funcs: [ 'console.log' ]
}
}
})
]
},
2019-11-29 16:53:50 +01:00
module: {
rules: [
{
test: /\.js$/,
use: {
loader: 'babel-loader',
options: {
presets: [ '@babel/preset-env' ]
}
}
}
]
}
});