aboutsummaryrefslogtreecommitdiff
path: root/webpack.prod.js
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+github@gmail.com>2021-07-22 16:07:19 +0200
committerJan-Hendrik Willms <tleilax+github@gmail.com>2021-07-22 16:19:12 +0200
commita3da1483a9e689846179159355badfec8073dbec (patch)
tree770dcca6bdf5f6f2a11b0e7fcbbeda6919a3fc52 /webpack.prod.js
current code from svn, revision 62608
Diffstat (limited to 'webpack.prod.js')
-rw-r--r--webpack.prod.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/webpack.prod.js b/webpack.prod.js
new file mode 100644
index 0000000..ba0f95e
--- /dev/null
+++ b/webpack.prod.js
@@ -0,0 +1,29 @@
+const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
+const TerserPlugin = require('terser-webpack-plugin')
+const common = require('./webpack.common.js')
+const webpack = require('webpack')
+const { merge } = require('webpack-merge')
+
+module.exports = merge(common, {
+ mode: 'production',
+ stats: 'errors-only',
+ devtool: 'source-map',
+ output: {
+ publicPath: undefined
+ },
+ optimization: {
+ minimize: true,
+ minimizer: [
+ new TerserPlugin(
+ {
+ extractComments: false
+ }
+ ),
+ new CssMinimizerPlugin({
+ minimizerOptions: {
+ preset: [ 'default', { discardComments: { removeAll: true } } ],
+ },
+ }),
+ ]
+ }
+})