-
Notifications
You must be signed in to change notification settings - Fork 12k
Script bundle does not include sourcemaps #13990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, this is expected and to have sourcemaps for libraries you need to enable "serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "myproj:build",
"sourceMap": {
"scripts": true,
"styles": true,
"vendor": true
}
}, |
Hi, thank you for your answer, I didn't know there was such options. |
hi, any updates on this? having a hybrid Angular app (AngularJS + Angular 8) and desire to see the legacy part sourcemaps, however, cannot find an appropriate solution would appreciate any further comment on this issue thanks in advance |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
No
Description
When you create a script bundle with the "scripts" config in angular.json, the generated sourcemap does not take in account the existing sourcemap in those scripts.
🔬 Minimal Reproduction
ng new myapp
create a folder lib with a dummy mylib.ts file
And a tsconfig.json file, enabling TypeScript sourcemap :
Build your dummy lib with a tsc command in lib folder.
Then update angular.json config to enable sourcemap and embed the script :
🔥 Exception or Error
When you launch the app with ng serve or ng build, the sourcemap available in devtools is mylib.js, the built code, whereas I would have expected to retrieve my initial lib TS file, which is available if I include directly the library in index.html.
Scripts.js :
🌍 Your Environment
Anything else relevant?
Maybe this can be fixed with some webpack config ?
The text was updated successfully, but these errors were encountered: