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

Proposal: Not remove MaterialModule in next release #4261

Closed
karolmie1 opened this issue Apr 25, 2017 · 4 comments
Closed

Proposal: Not remove MaterialModule in next release #4261

karolmie1 opened this issue Apr 25, 2017 · 4 comments

Comments

@karolmie1
Copy link

Bug, feature request, or proposal: Proposal

Just today I've replaced all MaterialModules with more specific module in my whole application, for example:

-import { MaterialModule } from '@angular/material';
 
+import { MdCardModule, MdButtonModule } from '@angular/material';
+const MATERIAL_MODULE = [ MdCardModule, MdButtonModule ];

What is the expected behavior?

For a medium sized application I expected some decrease in application size as I don't use all modules.
Before: https://ibb.co/eaw0wQ
After: https://ibb.co/fcR0wQ

What is the current behavior?

The application size did almost not change - really insignificant decrease, few kb. I guess that with es5 modules UglifyJS does good enough job for the change to have any impact. Or maybe even direct imports is not enough to weed out unnecessary parts of code.

Maybe it's just my specific setup (angular2-webpack-starter type). Did you experience any difference after switching to more specific imports?

What are the steps to reproduce?

If anyone interested in replicating the result:
https://bitbucket.org/kmierzej/fragaria-webapp/commits/6c78b86731c4e59d2a0527ed7ccdbe5737f72563

@devversion
Copy link
Member

This should be fixed with 76faae5.

Can you try installing npm i angular/material2-builds?

@karolmie1
Copy link
Author

I did, but unfortunately the results did not vary. Probably webpack fault. There is a huge discussion about this pure annotation thing.
I see the point of this depreciation now thought. I would leave this issue for a while, for someone else to maybe share their results. But that is up to you - just close if you feel like this.

@jelbourn
Copy link
Member

There's another issue tracked in #4137 about webpack not being able to do this. We're working on something now to fix this; MaterialModule is still going to go away, but only once the benefit applies without a lot of extra work.

@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 5, 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

3 participants