40 lines
920 B
JavaScript
40 lines
920 B
JavaScript
/*
|
|
* Copyright (c) 2020. Antonio Martinez Casadesus and Pascal Syma.
|
|
* All rights reserved.
|
|
*/
|
|
|
|
const merge = require("webpack-merge");
|
|
const path = require("path");
|
|
const base = require("./base");
|
|
const TerserPlugin = require("terser-webpack-plugin");
|
|
const WorkboxPlugin = require('workbox-webpack-plugin');
|
|
|
|
module.exports = merge(base, {
|
|
mode: "production",
|
|
output: {
|
|
filename: "bundle.min.js"
|
|
},
|
|
devtool: false,
|
|
performance: {
|
|
maxEntrypointSize: 900000,
|
|
maxAssetSize: 900000
|
|
},
|
|
optimization: {
|
|
minimizer: [
|
|
new TerserPlugin({
|
|
terserOptions: {
|
|
output: {
|
|
comments: false
|
|
}
|
|
}
|
|
})
|
|
]
|
|
},
|
|
plugins: [
|
|
new WorkboxPlugin.GenerateSW({
|
|
clientsClaim: true,
|
|
skipWaiting: true,
|
|
}),
|
|
]
|
|
});
|