Source maps not loading for script added through .angular-cli.json #7740
Labels
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
type: bug/fix
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.4.2
node: 6.9.5
os: win32 x64
@angular/animations: 4.4.2
@angular/common: 4.4.2
@angular/compiler: 4.4.2
@angular/core: 4.4.2
@angular/forms: 4.4.2
@angular/http: 4.4.2
@angular/platform-browser: 4.4.2
@angular/platform-browser-dynamic: 4.4.2
@angular/router: 4.4.2
@angular/upgrade: 4.4.2
@angular/cli: 1.4.2
@angular/compiler-cli: 4.4.2
@angular/language-service: 4.4.2
typescript: 2.3.4
Repro steps.
In .angular-cli.json, scripts section I've got reference to legacy library written in AngularJS with IFFEies which is bundled with gulp-uglify.
legacy-lib also contains source maps for lib ("../node_modules/legacy-lib/lib.js.map") which are generated using gulp-sourcemaps.
Functionality of this legacy library is used within Angular CLI based hybrid app. When using "ng serve -o" library is loaded and works fine but I can only see minified version in dev tools, I don't see source maps file.
Desired functionality.
I'd like source maps for legacy library to be included in build and picked up by browser dev tools so I can debug. This sounds like common scenario to me so I'm probably just missing something but I can't find anything relevant in docs or issues. I'd appreciate guidance on how to enable this functionality.
Mention any other details that might be useful.
Legacy library is based on https://github.com/johnpapa/generator-hottowel and it's build system.
This issue has been already raised (#7226) and closed but commits referenced there don't solve the problem (I updated Angular CLI to 1.4.2 and Angular to 4.4.2) - source maps are still not loading for a scenario outlined above.
I also noticed that work around I supplied (#7226 (comment)) now only works for last script imported through scripts i.e.:
would load only source maps for anotherlib - this workaround loads both somelib and anotherlib source maps in version 1.3.2 but source maps only for last script (anotherlib) in version 1.4.x
The text was updated successfully, but these errors were encountered: