]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not quote properties when optimizing bundles
authorJulius Härtl <jus@bitgrid.net>
Tue, 7 Jul 2020 07:18:43 +0000 (09:18 +0200)
committerJulius Härtl <jus@bitgrid.net>
Tue, 7 Jul 2020 07:23:32 +0000 (09:23 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
webpack.prod.js

index 7cf446b9be570414d55c890d43067ab5331dca7d..a24e6a2af64c75c05a39bcae29ca06796203725f 100644 (file)
@@ -1,9 +1,23 @@
 const merge = require('webpack-merge')
 const common = require('./webpack.common.js')
+const TerserPlugin = require('terser-webpack-plugin');
 
 module.exports = common.map(
        config => merge(config, {
                mode: 'production',
                devtool: '#source-map',
+               // This is required to keep IE11 compatibility (see #21316)
+               optimization: {
+                       minimize: true,
+                       minimizer: [
+                               new TerserPlugin({
+                                       terserOptions: {
+                                               output: {
+                                                       keep_quoted_props: true,
+                                               },
+                                       },
+                               }),
+                       ],
+               },
        })
 )