Skip to content

Commit dfa7169

Browse files
taneltmmrts
authored andcommitted
fix: Warning of missing source maps in website Chrome DevTools logs
Loading source maps has never worked for the content scripts. It failed silently until Chrome 80, but now a warning is displayed. It's currently unclear if/when source map loading would be supported. See https://chromium-review.googlesource.com/c/chromium/src/+/2141899 It would be possible, with additional rollup plugins, to inline the TS source maps, but that would increase the compiled .js file sizes a lot (over 100kb for content.js). Turning off source map for the content script. Signed-off-by: Tanel Metsar <[email protected]>
1 parent ea16b9f commit dfa7169

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

rollup.config.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default [
2323
{
2424
file: `dist/firefox/${name}.js`,
2525
format: "iife",
26-
sourcemap: true,
26+
sourcemap: name === "background",
2727
},
2828
],
2929

@@ -57,7 +57,7 @@ export default [
5757
{
5858
file: `dist/safari/${name}.js`,
5959
format: "iife",
60-
sourcemap: true,
60+
sourcemap: name === "background",
6161
},
6262
],
6363

@@ -88,9 +88,8 @@ export default [
8888

8989
output: [
9090
{
91-
file: "dist/firefox/token-signing-page-script.js",
92-
format: "iife",
93-
sourcemap: true,
91+
file: "dist/firefox/token-signing-page-script.js",
92+
format: "iife",
9493
},
9594
],
9695

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"declaration": true,
77
"declarationMap": true,
88
"moduleResolution": "node",
9-
"sourceMap": true,
109
"strict": true,
1110
"outDir": "dist",
1211
"baseUrl": ".",

0 commit comments

Comments
 (0)