Sourcemaps for legacy JS scripts have absolute path, instead of relative
See original GitHub issueVersions
angular/cli: 1.4.9
node: 6.11.3
os: win32 x64
@angular/animations: 4.4.6
@angular/common: 4.4.6
@angular/compiler: 4.4.6
@angular/core: 4.4.6
@angular/forms: 4.4.6
@angular/http: 4.4.6
@angular/platform-browser: 4.4.6
@angular/platform-browser-dynamic: 4.4.6
@angular/router: 4.4.6
@angular/cli: 1.4.9
@angular/compiler-cli: 4.4.6
@angular/language-service: 4.4.6
typescript: 2.3.4
Repro steps
- Add legacy js scripts to angular-cli.json scripts array
- Build via "ng build --prod --sm
here is my angular-cli.json:
],
"scripts": [
"App.js",
"modules/module1.js",
"modules/module2.js"
....
]
Observed behavior
Sourcemaps generated for legacy js scripts (scripts.bundle.js) contain relative path, instead js.map looks like this:
{"version":3,"sources":["C:\\Users\\ibalan\\Documents\\Projects\\myproject\\src\\App.js"}
Desired behavior
Sourcemaps should have relative paths, is there is switch or option in a config for this?
When I build with --dev - sourcemap for scripts is not created at all
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Relative SourceMap paths for debugging in WebStorm #238
I'd like to debug an application's JavaScript source files in WebStorm using SourceMaps. However this does not work with SourceMap files ...
Read more >Import statements in Nodejs with Typescript is not resolving ...
Your absolute imports are accepted by TypeScript compiler because in the tsconfig.json you specified baseUrl to "./src" , which means paths ...
Read more >Troubleshooting for React | Sentry Documentation
Double-check that your deployed, final JavaScript files have sourceMappingURL present. Alternately, instead of sourceMappingURL , you can set a SourceMap HTTP ...
Read more >Nodejs debugging - vscode-docs1
Today two wire protocols exist: - legacy: the original V8 Debugger Protocol which is ... program - an absolute path to the Node.js...
Read more >Emscripten Compiler Frontend (emcc)
The specified file path must be absolute, not relative. ... Instead keep the static initialization inside the generated JavaScript as text.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just tested on latest master and I see:
{"version":3,"sources":["D:/sandbox/master-project/node_modules/rxjs/_esm5/symbol/rxSubscriber.js",
){"version":3,"sources":["src/scripts.js"],
{"version":3,"sources":["D:/sandbox/master-project/src/D:/sandbox/master-project/styles.css"]
Something is definitely wrong with sourcemaps here.
Unfortunately, upgrading to 1.6 did not resolve the issue. I still get absolute paths.