Skip to content
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

sourcemaps for libraries are not included #11715

Closed
d-bechtel opened this issue Jul 31, 2018 · 6 comments · Fixed by #11732
Closed

sourcemaps for libraries are not included #11715

d-bechtel opened this issue Jul 31, 2018 · 6 comments · Fixed by #11732

Comments

@d-bechtel
Copy link

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

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Jul 31, 2018

Most likely you need to enable vendorSourceMap in angular.json under the build options or as a command argument vendor-source-map

@d-bechtel
Copy link
Author

enabling vendorSourceMap doesn't change anything on this issue

@alan-agius4
Copy link
Collaborator

I have tried this out and adding vendorSourceMap did solve this issue;

image

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": []
  },

@d-bechtel
Copy link
Author

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

@imike57
Copy link

imike57 commented Mar 19, 2019

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 <style> tag.

I try to add "vendorSourceMap": true in my angular.json, but not working and found nothing elsewhere... Someone know a solution ?

Thank's

Mike

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants