Skip to content
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

Material theme broken with Build Optimizer. #9221

Closed
dinerotah opened this issue Jan 15, 2018 · 5 comments
Closed

Material theme broken with Build Optimizer. #9221

dinerotah opened this issue Jan 15, 2018 · 5 comments

Comments

@dinerotah
Copy link
Contributor

dinerotah commented Jan 15, 2018

Versions

Angular CLI: 1.6.4
Node: 6.11.3
OS: win32 x64
Angular: 5.2.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

@angular/cdk: 5.0.4
@angular/cli: 1.6.4
@angular/material: 5.0.4
@angular-devkit/build-optimizer: 0.0.37
@angular-devkit/core: 0.0.24
@angular-devkit/schematics: 0.0.45
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.4
@schematics/angular: 0.1.12
typescript: 2.6.2
webpack: 3.10.0

Repro steps

Observed behavior

Running npm run start -- --prod produce a fab button wihtout accent color:

with bd

Running npm run start -- --prod --build-optimizer=false works fine:

without-bd

Desired behavior

Same behavior with/without Build Optimizer.

Mention any other details that might be useful (optional)

@dinerotah
Copy link
Contributor Author

dinerotah commented Jan 15, 2018

@filipesilva After digging around I found that uglifyCompressOptions.pure_getters = true was removing something that is useful. By removing https://github.com/angular/angular-cli/blob/master/packages/%40angular/cli/models/webpack-configs/production.ts#L131 everything works fine.

This compression in my case decrease the vendor bundle size by 1.63%
glifyCompressOptions.pure_getters = false

image

glifyCompressOptions.pure_getters = true

image

@clydin
Copy link
Member

clydin commented Jan 15, 2018

Nice job on the research. This is actually being tracked over here: angular/devkit#388. And there's a pending PR against material to fix.

@Brocco
Copy link
Contributor

Brocco commented Jan 15, 2018

Closing as this is being tracked by the issue mentioned by @clydin above.

@alexjlockwood
Copy link

Could anyone recommend a workaround for this issue?

@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
None yet
Projects
None yet
Development

No branches or pull requests

4 participants