Skip to content

ng serve uses sourcemaps even when they are turned off #15273

@filipesilva

Description

@filipesilva

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

Yes, but I don't know what the last version where this didn't happen was.

Description

ng serve uses sourcemaps even when they are turned off (the default for a new project for `--prod`).

🔬 Minimal Reproduction

  • ng new next-project && cd next-project
  • ng serve --prod
  • ng build --prod
  • Chunk list shows sourcemaps on serve but not on build

🔥 Exception or Error

kamik@RED-X1C6 MINGW64 /d/sandbox/next-project (master)
$ ng serve --prod
****************************************************************************************
This is a simple server for use in testing or debugging Angular applications locally.
It hasn't been reviewed for security issues.

DON'T USE IT FOR PRODUCTION!
****************************************************************************************
 10% building 3/3 modules 0 activei 「wds」: Project is running at http://localhost:4200/webpack-dev-server/
i 「wds」: webpack output is served from /
i 「wds」: 404s will fallback to //index.html

chunk {0} runtime.d15866985badb950daa9.js, runtime.d15866985badb950daa9.js.map (runtime) 1.46 kB [entry] [rendered]
chunk {1} main.78106fc448395a14fbe1.js, main.78106fc448395a14fbe1.js.map (main) 280 kB [initial] [rendered]
chunk {2} polyfills.6d13224450ef19d5b7d0.js, polyfills.6d13224450ef19d5b7d0.js.map (polyfills) 36.5 kB [initial] [rendered]
chunk {3} styles.7fd3d1f74ceb0d09dcf9.css, styles.7fd3d1f74ceb0d09dcf9.css.map (styles) 59 bytes [initial] [rendered]
Date: 2019-08-07T14:22:53.822Z - Hash: 290664aeca44326f0b7b - Time: 28572ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
i 「wdm」: Compiled successfully.

kamik@RED-X1C6 MINGW64 /d/sandbox/next-project (master)
$ ng build --prod

chunk {0} runtime.d15866985badb950daa9.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.642e74c22a987b4719c3.js (main) 135 kB [initial] [rendered]
chunk {2} polyfills.29c1267b679a73b1d555.js (polyfills) 36.4 kB [initial] [rendered]
chunk {3} styles.3ff695c00d717f2d2a11.css (styles) 0 bytes [initial] [rendered]
Date: 2019-08-07T14:29:14.756Z - Hash: 8ddb13532e31e042e528 - Time: 22130ms

🌍 Your Environment


Angular CLI: 8.3.0-next.0
Node: 10.16.0
OS: win32 x64
Angular: 8.2.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.0-next.0
@angular-devkit/build-angular     0.803.0-next.0
@angular-devkit/build-optimizer   0.803.0-next.0
@angular-devkit/build-webpack     0.803.0-next.0
@angular-devkit/core              8.3.0-next.0
@angular-devkit/schematics        8.3.0-next.0
@angular/cli                      8.3.0-next.0
@ngtools/webpack                  8.3.0-next.0
@schematics/angular               8.3.0-next.0
@schematics/update                0.803.0-next.0
rxjs                              6.4.0
typescript                        3.5.3
webpack                           4.38.0

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions