Angular-cli: Support (@angular/*) source maps coming from node_modules

Created on 17 Mar 2017  路  8Comments  路  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

  • [x] feature request

Versions.

@angular/cli: 1.0.0-rc.2
node: 6.9.5
os: darwin x64
@angular/animations: 4.0.0-rc.4
@angular/common: 4.0.0-rc.4
@angular/compiler: 4.0.0-rc.4
@angular/core: 4.0.0-rc.4
@angular/forms: 4.0.0-rc.4
@angular/http: 4.0.0-rc.4
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 4.0.0-rc.4
@angular/platform-browser-dynamic: 4.0.0-rc.4
@angular/platform-server: 4.0.0-rc.4
@angular/router: 4.0.0-rc.4
@angular/service-worker: 1.0.0-beta.7
@angular/cli: 1.0.0-rc.2
@angular/compiler-cli: 4.0.0-rc.2

Repro steps.

  1. upgrade project to Angular 4.0.0-rc.4 (previous rcs had issues with source maps)
  2. use ng build, ng serve or ng build --prod --sm

The log given by the failure.

no errors

Desired functionality.

the source maps coming from @angular/* packages should be used as input source maps into the build and passed through all the way to the final bundles, so that I can open vendor bundle using source-map-explorer and see angular typescript files in there.

Mention any other details that might be useful.

I can work around this by manually removing the exclude rule from webpack-configs/common.ts but then I hit #5476

devkibuild-angular feature

Most helpful comment

Is this something that you would be interested in a community contribution to fix? Our use case is a little bit different than the title of this issue, but we have our own library source maps we would like to get included during builds.

All 8 comments

Is the vision to always include source maps for @angular/* or to control this via a flag?

@Brocco we should always include it unless there is a reason not to in some cases (perf?)

Removing this from the 1.0 BLOCKING. In an hello world program, this adds 6 seconds to the build time, so we will be punting this to 1.x with a design phase.

The solution will be to have the --sourcemaps flag accept a list of values, keeping the current behaviour the same, but adding another value that will add node_modules to the source maps.

Is this something that you would be interested in a community contribution to fix? Our use case is a little bit different than the title of this issue, but we have our own library source maps we would like to get included during builds.

is support for source maps from node_modules 3rd party libs coming anytime soon? I've got the same driver for this as @drstanic

Any updates on this?

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

This is at the moment supported via vendorSourceMap flag (https://angular.io/cli/build).

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._

Was this page helpful?
0 / 5 - 0 ratings