From fbf4df7f82d0156e0b21d1b52e1baa077c301fc2 Mon Sep 17 00:00:00 2001 From: Fabio Coelho Date: Mon, 23 Jan 2023 15:49:17 -0300 Subject: [PATCH 1/2] enable source map on minify --- webpack.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webpack.config.js b/webpack.config.js index 105e390c..44848879 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -37,6 +37,7 @@ function terserMinimizer(file, _sourceMap) { return require('@swc/core').minify(file, { keepClassnames: true, keepFnames: true, + sourceMap: true, }) } From 2b900c34ec0ff06953b6f864f751392be4d12365 Mon Sep 17 00:00:00 2001 From: Fabio Coelho Date: Wed, 25 Jan 2023 15:43:33 -0300 Subject: [PATCH 2/2] enable source maps on production build by default --- webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 44848879..a6cd8aab 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -229,7 +229,7 @@ function server(env, argv) { } const isDev = argv.environment === 'development' const folder = isDev ? '.development' : '.production' - const devtool = isDev ? 'inline-cheap-module-source-map' : false + const devtool = isDev ? 'inline-cheap-module-source-map' : 'source-map' const minimize = !isDev const plugins = [] if (isDev) { @@ -359,7 +359,7 @@ function client(env, argv) { const entryExtension = existsSync(path.join(dir, 'client.ts')) ? 'ts' : 'js' const isDev = argv.environment === 'development' const folder = isDev ? '.development' : '.production' - const devtool = isDev ? 'inline-cheap-module-source-map' : false + const devtool = isDev ? 'inline-cheap-module-source-map' : 'source-map' const minimize = !isDev const babel = argv.loader === 'babel' const plugins = [