Skip to content

[1.5.0-rc.3] build-optimizer is not enabled by default with ng5 and AoT #8169

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
cexbrayat opened this issue Oct 24, 2017 · 1 comment · Fixed by #8172
Closed

[1.5.0-rc.3] build-optimizer is not enabled by default with ng5 and AoT #8169

cexbrayat opened this issue Oct 24, 2017 · 1 comment · Fixed by #8172
Assignees
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix

Comments

@cexbrayat
Copy link
Member

cexbrayat commented Oct 24, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Angular CLI: 1.5.0-rc.3
Node: 8.7.0
OS: darwin x64
Angular: 5.0.0-rc.5
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

@angular/cli: 1.5.0-rc.3
@angular-devkit/build-optimizer: 0.0.30
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.34
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0-rc.3
@schematics/angular: 0.0.48
typescript: 2.4.2
webpack: 3.8.1

Repro steps.

According to #8077 build-optimizer should be enabled by default for ng 5 and prod builds.

But ng build --prod gives:

ng build --prod
Date: 2017-10-24T15:35:35.970Z
Hash: b87301c166c5ea763377
Time: 47631ms
chunk {0} 0.2bf301a0f842bddd66ee.chunk.js (common) 412 bytes {4}  [rendered]
chunk {1} 1.ac461fad7cdf106e6a4a.chunk.js () 467 kB {2} {4}  [rendered]
chunk {2} 2.99a559783dae0a9774a1.chunk.js () 330 kB {1} {4}  [rendered]
chunk {3} polyfills.da2f61d4c68f484fd72e.bundle.js (polyfills) 96 kB {7} [initial] [rendered]
chunk {4} main.1f40ff38fdc140af1a7c.bundle.js (main) 30.6 kB {6} [initial] [rendered]
chunk {5} styles.5bdc5fdb45bbd1cada38.bundle.css (styles) 166 kB {7} [initial] [rendered]
chunk {6} vendor.885644dd08fa95a21eef.bundle.js (vendor) 391 kB [initial] [rendered]
chunk {7} inline.62b02c9a8df0f4e1d789.bundle.js (inline) 1.52 kB [entry] [rendered]

vendor.bundle.js is still there whereas it is not with build-optimizer explicitly enabled:

g build --prod --build-optimizer
Date: 2017-10-24T15:44:25.060Z
Hash: 4723427020a03144d642
Time: 47139ms
chunk {0} 0.2bf301a0f842bddd66ee.chunk.js (common) 412 bytes {4}  [rendered]
chunk {1} 1.ac461fad7cdf106e6a4a.chunk.js () 467 kB {2} {4}  [rendered]
chunk {2} 2.99a559783dae0a9774a1.chunk.js () 330 kB {1} {4}  [rendered]
chunk {3} polyfills.da2f61d4c68f484fd72e.bundle.js (polyfills) 96 kB {6} [initial] [rendered]
chunk {4} main.1729ba3a083dc006edb0.bundle.js (main) 421 kB {6} [initial] [rendered]
chunk {5} styles.5bdc5fdb45bbd1cada38.bundle.css (styles) 166 kB {6} [initial] [rendered]
chunk {6} inline.cb9dc575089cdc706678.bundle.js (inline) 1.52 kB [entry] [rendered]

Desired functionality.

It looks like #8077 may not work as intended

cc @filipesilva

@filipesilva filipesilva self-assigned this Oct 24, 2017
@filipesilva filipesilva added type: bug/fix P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful labels Oct 24, 2017
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 24, 2017
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 24, 2017
hansl pushed a commit that referenced this issue Oct 24, 2017
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this issue Apr 23, 2018
@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 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants