diff --git a/webpack.config.js b/webpack.config.js index 1a646ce40e1..a4a4bb26f92 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -11,6 +11,8 @@ const webpack = require('webpack') const { mergeWithRules } = require('webpack-merge') const commonWebpackConfig = require('./webpack.common.config.js') +const IS_PROD = process.env.NODE_ENV === 'production' + module.exports = mergeWithRules({ module: { // Rules from @nextcloud/webpack-vue-config/rules already added by commonWebpackConfig @@ -67,4 +69,11 @@ module.exports = mergeWithRules({ ], cache: true, + + devtool: IS_PROD + // .js.map files with original file names and lines but without the source code + // Tradeoff choice between dist size and features + ? 'nosources-source-map' + // Mid-quality (transformed) SourceMaps with ok/slow build/rebuild + : 'cheap-source-map', })