Skip to content

Commit

Permalink
fix: Warning of missing source maps in website Chrome DevTools logs
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
taneltm authored and mrts committed Oct 24, 2022
1 parent ea16b9f commit dfa7169
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 4 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default [
{
file: `dist/firefox/${name}.js`,
format: "iife",
sourcemap: true,
sourcemap: name === "background",
},
],

Expand Down Expand Up @@ -57,7 +57,7 @@ export default [
{
file: `dist/safari/${name}.js`,
format: "iife",
sourcemap: true,
sourcemap: name === "background",
},
],

Expand Down Expand Up @@ -88,9 +88,8 @@ export default [

output: [
{
file: "dist/firefox/token-signing-page-script.js",
format: "iife",
sourcemap: true,
file: "dist/firefox/token-signing-page-script.js",
format: "iife",
},
],

Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"declaration": true,
"declarationMap": true,
"moduleResolution": "node",
"sourceMap": true,
"strict": true,
"outDir": "dist",
"baseUrl": ".",
Expand Down

0 comments on commit dfa7169

Please sign in to comment.