Skip to content

Commit e1f1daa

Browse files
committed
Set swc loader inputSourceMap to false
1 parent 190a4e6 commit e1f1daa

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

development/webpack/utils/loaders/swcLoader.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,7 @@ export default function swcLoader(this: Context, src: string, srcMap?: string) {
181181
...pluginOptions,
182182
envName: this.mode,
183183
filename: this.resourcePath,
184-
inputSourceMap:
185-
// some files in node_modules claim to have sourcemaps when they do
186-
// not[0], and SWC has a bug where logs to stderror if it tries to use a
187-
// sourcemap that does not exist[1]. So we disable sourcemaps for
188-
// node_modules. Ideally, we would not disable them, as they *are* useful
189-
// for debugging.
190-
// [0]: https://github.com/trezor/trezor-suite/issues/20298
191-
// [1]: https://github.com/swc-project/swc/issues/9416
192-
this.resourcePath.includes(`${sep}node_modules${sep}`) ? false : srcMap,
184+
inputSourceMap: false,
193185
sourceFileName: this.resourcePath,
194186
sourceMaps: this.sourceMap,
195187
swcrc: false,

0 commit comments

Comments
 (0)