Exclude filerobot from minification (fix #573)

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/579/head
Varun Patil 2023-04-16 22:28:56 -07:00
parent d2273f404b
commit 85b979cd49
1 changed files with 17 additions and 0 deletions

View File

@ -1,6 +1,7 @@
const webpackConfig = require('@nextcloud/webpack-vue-config')
const WorkboxPlugin = require('workbox-webpack-plugin')
const path = require('path')
const TerserPlugin = require('terser-webpack-plugin')
const buildMode = process.env.NODE_ENV
const isDev = buildMode === 'development'
@ -31,4 +32,20 @@ webpackConfig.plugins.push(
})
);
// Exclusions from minification
const minifyExclude = [
/filerobot-image-editor/,
]
webpackConfig.optimization.minimizer[0] =
new TerserPlugin({
exclude: minifyExclude,
terserOptions: {
output: {
comments: false,
}
},
extractComments: true,
});
module.exports = webpackConfig