Skip to content

Allow excluding specific source maps #13881

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

Closed
AbeerSul opened this issue Mar 12, 2019 · 2 comments
Closed

Allow excluding specific source maps #13881

AbeerSul opened this issue Mar 12, 2019 · 2 comments

Comments

@AbeerSul
Copy link

AbeerSul commented Mar 12, 2019

🚀 Feature request

Command (mark with an x)

- [ ] new
- [x] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Description

Angular CLI: 7.3.5
Angular: 7.2.7

When I configure build or serve commands to produce source maps in angular.json:
"serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "hasib-apps:build", "sourceMap": { "scripts": true, "styles": false, "hidden": false, "vendor": true } }, "configurations": { "production": { "browserTarget": "hasib-apps:build:production" } } },

I get the warnings for vendors that do not have map files like below:

WARNING in ./node_modules/@devexpress/analytics-core/dx-analytics-core.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'dx-designer-core.js.map': Error: Can't resolve './dx-designer-core.js.map' in 'C:\Users\Abeer.Sulaiman\source\Workspaces\Workspace2017\ERP\Sources\Hasib.SSM\Hasib.SSM.Web\node_modules@devexpress\analytics-core'
.
WARNING in ./node_modules/devexpress-reporting/dx-reportdesigner.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'dx-reportdesigner.js.map': Error: Can't resolve './dx-reportdesigner.js.map' in 'C:\Users\Abeer.Sulaiman\source\Workspaces\Workspace2017\ERP\Sources\Hasib.SSM\Hasib.SSM.Web\node_modules\devexpress-reporting'
.
.
And I wish I can disable these warnings as I cannot force installed package 'devexpress-reporting' to have source maps.

Describe the solution you'd like

Allow developers to exclude specific vendor source maps. For example, exclude property can be useful here:
"serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "hasib-apps:build", "sourceMap": { "scripts": true, "styles": false, "hidden": false, "vendor": true, "exclude": [ "node_modules/devexpress-reporting" ] } }, "configurations": { "production": { "browserTarget": "hasib-apps:build:production" } } },

Describe alternatives you've considered

  1. Attempted to use "ng eject" to extract webpack.config.json and configure it to exclude "node_modules/devexpress-reporting" but got the error:

`The 'eject' command has been disabled and will be removed completely in 8.0.
The new configuration format provides increased flexibility to modify the
configuration of your workspace without ejecting.

There are several projects that can be used in conjuction with the new
configuration format that provide the benefits of ejecting without the maintenance
overhead. One such project is ngx-build-plus found here:
https://github.com/manfredsteyer/ngx-build-plus`

  1. Disabled vendor source maps when I don't necessarily need them, to avoid seeing this warning for this vendor.
@alan-agius4
Copy link
Collaborator

Duplicate of #11305

@alan-agius4 alan-agius4 marked this as a duplicate of #11305 Mar 12, 2019
@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants