tainacan/webpack.prod.js

32 lines
701 B
JavaScript
Raw Normal View History

const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const TerserPlugin = require('terser-webpack-plugin');
2020-11-19 20:37:45 +00:00
const terserPlugin = new TerserPlugin({
parallel: true,
extractComments: false,
terserOptions: {
output: {
comments: /translators:/i,
},
mangle: {
reserved: ["__"],
}
},
});
module.exports = merge(common, {
mode: 'production',
devtool: undefined,
optimization: {
2020-11-19 20:37:45 +00:00
minimize: true,
minimizer: [terserPlugin]
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.min',
'Swiper$': 'swiper/js/swiper.min.js'
}
}
});