From 0b848fea3565e8b4ca3cb125c09398671c280e30 Mon Sep 17 00:00:00 2001 From: Billy Zhou Date: Wed, 14 Aug 2024 12:07:11 -0700 Subject: [PATCH 1/2] fix: output inline source maps with tsc --- tsconfig.webpack.json | 3 ++- webpack/webpack.prod.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tsconfig.webpack.json b/tsconfig.webpack.json index 0b0adf68..53097319 100644 --- a/tsconfig.webpack.json +++ b/tsconfig.webpack.json @@ -1,7 +1,8 @@ { "compilerOptions": { "module": "es2020", - "outDir": "./dist/webpack" + "outDir": "./dist/webpack", + "sourceMap": true }, "include": ["src/index-browser.ts"], "extends": "./tsconfig" diff --git a/webpack/webpack.prod.js b/webpack/webpack.prod.js index b476add4..28aaff6e 100644 --- a/webpack/webpack.prod.js +++ b/webpack/webpack.prod.js @@ -5,7 +5,7 @@ const TerserPlugin = require('terser-webpack-plugin'); module.exports = merge(common, { mode: 'production', - devtool: 'hidden-source-map', + devtool: 'source-map', optimization: { minimizer: [ new TerserPlugin({ From f2ca9577f28f1878d4a2c81d50573533c31525c6 Mon Sep 17 00:00:00 2001 From: Billy Zhou Date: Wed, 14 Aug 2024 12:23:27 -0700 Subject: [PATCH 2/2] revert: hide source map from devtools in productions --- webpack/webpack.prod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack/webpack.prod.js b/webpack/webpack.prod.js index 28aaff6e..b476add4 100644 --- a/webpack/webpack.prod.js +++ b/webpack/webpack.prod.js @@ -5,7 +5,7 @@ const TerserPlugin = require('terser-webpack-plugin'); module.exports = merge(common, { mode: 'production', - devtool: 'source-map', + devtool: 'hidden-source-map', optimization: { minimizer: [ new TerserPlugin({