Exclude filerobot from minification (fix #573)
Signed-off-by: Varun Patil <varunpatil@ucla.edu>pull/579/head
parent
d2273f404b
commit
85b979cd49
17
webpack.js
17
webpack.js
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue