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
Source maps not loading for script added through .angular-cli.json #7226
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.
FWIW whilst not the desired route, you can add debugger statements in those files and chrome does show a debuggable file, although these are not available through sources.
There was a similar issue with node_modules not having sourcemaps either, not sure if that was fixed.
but this will also mean that prod builds will contain source maps (which can be fixed by adding build script to delete these in the end of the build - not ideal but would do the job)
Activity
alastair-todd commentedon Aug 3, 2017
+1
alastair-todd commentedon Aug 3, 2017
FWIW whilst not the desired route, you can add debugger statements in those files and chrome does show a debuggable file, although these are not available through sources.
There was a similar issue with node_modules not having sourcemaps either, not sure if that was fixed.
adamlubek commentedon Aug 3, 2017
another workaround is to include source maps through .angular-cli.json assets section:
but this will also mean that prod builds will contain source maps (which can be fixed by adding build script to delete these in the end of the build - not ideal but would do the job)
are you referring to this one: #5477
feat(@angular/cli): support sourcemaps and minification in scripts
feat(@angular/cli): support sourcemaps and minification in scripts
feat(@angular/cli): support sourcemaps and minification in scripts
feat(@angular/cli): support sourcemaps and minification in scripts
feat(@angular/cli): support sourcemaps and minification in scripts
angular-automatic-lock-bot commentedon Sep 7, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
feat(@angular/cli): support sourcemaps and minification in scripts