Skip to content

Sourcemaps for legacy JS scripts have absolute path, instead of relative #8778

@toddams

Description

@toddams

Versions

angular/cli: 1.4.9
node: 6.11.3
os: win32 x64
@angular/animations: 4.4.6
@angular/common: 4.4.6
@angular/compiler: 4.4.6
@angular/core: 4.4.6
@angular/forms: 4.4.6
@angular/http: 4.4.6
@angular/platform-browser: 4.4.6
@angular/platform-browser-dynamic: 4.4.6
@angular/router: 4.4.6
@angular/cli: 1.4.9
@angular/compiler-cli: 4.4.6
@angular/language-service: 4.4.6
typescript: 2.3.4

Repro steps

  • Add legacy js scripts to angular-cli.json scripts array
  • Build via "ng build --prod --sm

here is my angular-cli.json:

],
      "scripts": [
        "App.js",
        "modules/module1.js",
        "modules/module2.js"
        ....
]

Observed behavior

Sourcemaps generated for legacy js scripts (scripts.bundle.js) contain relative path, instead js.map looks like this:

{"version":3,"sources":["C:\\Users\\ibalan\\Documents\\Projects\\myproject\\src\\App.js"}

Desired behavior

Sourcemaps should have relative paths, is there is switch or option in a config for this?

When I build with --dev - sourcemap for scripts is not created at all

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions