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

Turn off sourcesContent in .map files #22708

Closed
2 of 15 tasks
UchihaYuki opened this issue Feb 15, 2022 · 5 comments
Closed
2 of 15 tasks

Turn off sourcesContent in .map files #22708

UchihaYuki opened this issue Feb 15, 2022 · 5 comments

Comments

@UchihaYuki
Copy link

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Description

I found the .map files generated by angular will contain sourcesContent property. Is it possible to delete it? I tried to use custom webpack, but I can't get the original webpack.config.js angular uses. So I don't know what to do.

I also find angular will modify my exiting angular libraries .map files to add sourcesContent property, which will disable vscode's Go to Implementation function.

I asked in gitter, but no body replies. I guess I'll have better chance here.

🌍 Your Environment


Angular CLI: 11.2.18
Node: 16.13.1
OS: win32 x64

Angular: undefined
... 
Ivy Workspace: Yes

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1102.18 (cli-only)     
@angular-devkit/core         11.2.18 (cli-only)       
@angular-devkit/schematics   11.2.18 (cli-only)       
@schematics/angular          11.2.18 (cli-only)       
@schematics/update           0.1102.18 (cli-only)     
typescript                   4.5.5
@UchihaYuki
Copy link
Author

@alan-agius4
Copy link
Collaborator

This is caused by NGCC and It is not possible to turn this off. It is recommended to build and ship your Angular libraries using v13+ which would not require processing by NGCC.

This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag angular-cli.

If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.

@UchihaYuki
Copy link
Author

It is a bug, please look at this issue.
microsoft/vscode#142980
sourcesContent property does prevent vscode code work properly. But I do understant that, it's not possible to delete it in angular. Maybe I just need to wait for the bug to be fixed by vscode.

@UchihaYuki
Copy link
Author

You can close it, after viewing my comment. Thank you.

@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 Mar 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants