sourcemaps for libraries are not included
Bug Report or Feature Request (mark with an x)
- [X] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x)
- [ ] new
- [X] build
- [X] serve
- [ ] test
- [ ] e2e
- [X] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
Repro steps
ng new some-app-name ng generate library some-lib-name ng build some-lib-name ng serve open chrome, point to http://localhost:4200 and open developer tools.
Desired functionality
Developer tools should show the original source code (ts code) for the library
Mention any other details that might be useful
Most likely you need to enable vendorSourceMap in angular.json under the build options or as a command argument vendor-source-map
enabling vendorSourceMap doesn't change anything on this issue
I have tried this out and adding vendorSourceMap did solve this issue;

Here's an extract from my angular.json
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"vendorSourceMap": true,
"outputPath": "dist/some-app-name",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
the property in angular.json works, but is not compatible with the schema.json the cli argument: ng serve --source-map --vendor-source-map doesn't work
there is a solution for this ?
I created a lib following this https://angular.io/guide/creating-libraries Yet, any css related to the library provide a source map. All style are in a