You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sourceMappingURL in string literal will cause source-maps not to load when using --enable-source-maps #44654
Linux 5.18.16-1rodete1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.16-1rodete1 (2022-08-24) x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
server.js
"use strict";letcontent='';content='/*# sourceMappingURL='+content+' */';thrownewError('This should point to TypeScript file.');//# sourceMappingURL=server.js.map
$ node --enable-source-maps server.js
Error: This should point to TypeScript file.
at Object.<anonymous> (/server.js:4:7)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
Stacktrace points to the orginal source file when using --enable-source-maps option.
What do you see instead?
Sourcemaps are not loaded when the files contains /*# sourceMappingURL= as string literal and as such the stacktrace points to JavaScript output instead of the TypeScript source.
Activity
lib: don't match `sourceMappingURL` in strings
lib: don't match `sourceMappingURL` in strings
feat(@nguniversal/builders): add sourcemap mapping support for dev-se…
feat(@nguniversal/builders): add sourcemap mapping support for dev-se…
lib: don't match `sourceMappingURL` in strings