Skip to content

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

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

Closed
filipesilva opened this issue Aug 8, 2019 · 1 comment · Fixed by #15328
Closed

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

filipesilva opened this issue Aug 8, 2019 · 1 comment · Fixed by #15328
Labels
Milestone

Comments

@filipesilva
Copy link
Contributor

🐞 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?

@filipesilva filipesilva added this to the 8.2.x milestone Aug 8, 2019
mgechev pushed a commit that referenced this issue Aug 15, 2019
…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
mgechev pushed a commit that referenced this issue Aug 15, 2019
…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
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant