Angular-cli: source maps not generated for server bundle

Created on 19 Dec 2017  路  8Comments  路  Source: angular/angular-cli

Versions

Angular CLI: 1.6.1
Node: 8.9.1
OS: win32 x64
Angular: 5.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cli: 1.6.1
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.42
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.1
@schematics/angular: 0.1.11
typescript: 2.7.0-dev.20171216
webpack-bundle-analyzer: 2.9.0
webpack-node-externals: 1.6.0
webpack: 3.10.0

Repro steps

  1. Create new app with ng new ....
  2. Follow https://github.com/angular/angular-cli/wiki/stories-universal-rendering.
  3. Add --sourcemaps to both ng build commands in the package.json file.
  4. Run yarn run build:ssr && yarn run serve:ssr.

Observed behavior

Sourcemaps are generated for the browser build, but not for the server build.

Desired behavior


Sourcemaps should be generated for the server build. This would allow better server error stack traces when using https://www.npmjs.com/package/source-map-support.

2 (required) bufix

Most helpful comment

Any news guys?

I'm unable to use sourcemaps to debug nodejs app.
That makes me cry sometimes 馃槕

All 8 comments

We concluded that this issue is probably the root cause of issue #1449 in the new CLI-based dotnet core angular templates. I'm not sure I have the expertise to fix this myself at the moment, but I would be among the happy customers if this were addressed.

Any news guys?

I'm unable to use sourcemaps to debug nodejs app.
That makes me cry sometimes 馃槕

Any update on that?

Oh, come on guys @filipesilva @mhevery
Thats so important to work with universal projects

@glebmachine Such comments are not in the best spirit. We are doing best we can we the resources we have. Solving this issue means that we don't solve a different issue. To you this is very important, but we have to weigh it against all other issues we have to focus on, and in grand scheme of things there are more important issues which effect more people which need to get addressed first. Feel free to create a fix and send a PR.

This is working on @angular/[email protected] with the @angular-devkit/build-angular:server builder and the --source-map flag.

Thank you guys!

@mhevery, totally agree with you, thank for you job and excuse me to being selfish here)

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