-
Notifications
You must be signed in to change notification settings - Fork 12k
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
angular.json: sourceMap.vendor-option in build has no affect on serve #15064
Comments
Yes I encountered this issue too. Spent half day to realize the deprecated |
OMG, when are either the docs going to get fixed or the code? been battling with this for hours too... |
…rridden by defaults in schema (#15328) We have a number of browser options that we allow the dev-server to merge. However, this only happens when such as options are undefined from the dev-server builder. At the moment these option have defaults inside their schema which results in them never being `undefined`, and hence the overridden logic is bypassed. See: https://github.com/angular/angular-cli/blob/6dd5b186d4dc0ed750cc195d9ebe1aaa282bb640/packages/angular_devkit/build_angular/src/dev-server/index.ts#L49-L63 and https://github.com/angular/angular-cli/blob/6dd5b186d4dc0ed750cc195d9ebe1aaa282bb640/packages/angular_devkit/build_angular/src/dev-server/index.ts#L107-L115 Fixes #15273 and fixes #15064
…rridden by defaults in schema (#15328) We have a number of browser options that we allow the dev-server to merge. However, this only happens when such as options are undefined from the dev-server builder. At the moment these option have defaults inside their schema which results in them never being `undefined`, and hence the overridden logic is bypassed. See: https://github.com/angular/angular-cli/blob/6dd5b186d4dc0ed750cc195d9ebe1aaa282bb640/packages/angular_devkit/build_angular/src/dev-server/index.ts#L49-L63 and https://github.com/angular/angular-cli/blob/6dd5b186d4dc0ed750cc195d9ebe1aaa282bb640/packages/angular_devkit/build_angular/src/dev-server/index.ts#L107-L115 Fixes #15273 and fixes #15064
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?
Kinda, if I use ng serve --vendorSourceMap, I'm getting the source maps. But this flag is deprecated and it seems like the sourceMap.vendor-option of the angular.json is the new way to go.
Description
According to the documentation, the serve section in angular.json overrides build defaults and supplies additional serve defaults.
This seems not to be happening with the following configuration:
If I'm running
ng serve
the source maps for my library are missing. If I move this option to the serve section, the source maps are getting transferred to client.It seems, like the compiled output is the same for build and serve.
🔬 Minimal Reproduction
ng new my-app
ng g library my-lib
<lib-my-lib></lib-my-lib>
and update app.module.ts with the necessary imports.ng b my-lib && ng serve
If you now inspect the application within the browsers DevTools you won't find the my-lib.component.ts
If you set the sourceMap option under serve, you'll get the *.ts file.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: