angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.37k stars 6.74k forks source link

angular material/components is compiling parts that are not even part of the imports (ivy) #16515

Closed p3x-robot closed 5 years ago

p3x-robot commented 5 years ago

Reproduction

I import a few components in material:

MatIconModule,
MatProgressBarModule,
MatMenuModule,
MatButtonModule,
MatTooltipModule,
MatToolbarModule,
MatCardModule,
MatSnackBarModule,
MatInputModule,
MatSidenavModule,

but for me it looks like it compiles and bundles everything:

Compiling @angular/material/core : module as esm5

Compiling @angular/cdk/portal : module as esm5

Compiling @angular/cdk/overlay : module as esm5

Compiling @angular/forms : module as esm5

Compiling @angular/material/form-field : module as esm5

Compiling @angular/material/autocomplete : module as esm5

Compiling @angular/material/badge : module as esm5

Compiling @angular/cdk/layout : module as esm5

Compiling @angular/material/bottom-sheet : module as esm5

Compiling @angular/material/button : module as esm5

Compiling @angular/material/button-toggle : module as esm5

Compiling @angular/material/card : module as esm5

Compiling @angular/material/checkbox : module as esm5

Compiling @angular/material/chips : module as esm5

Compiling @angular/material/dialog : module as esm5

Compiling @angular/cdk/text-field : module as esm5

Compiling @angular/material/input : module as esm5

Compiling @angular/material/datepicker : module as esm5

Compiling @angular/material/divider : module as esm5

Compiling @angular/cdk/accordion : module as esm5

Compiling @angular/material/expansion : module as esm5

Compiling @angular/material/grid-list : module as esm5

Compiling @angular/material/icon : module as esm5

Compiling @angular/material/list : module as esm5

Compiling @angular/material/menu : module as esm5

Compiling @angular/material/select : module as esm5

Compiling @angular/material/tooltip : module as esm5

Compiling @angular/material/paginator : module as esm5

Compiling @angular/material/progress-bar : module as esm5

Compiling @angular/material/progress-spinner : module as esm5

Compiling @angular/material/radio : module as esm5

Compiling @angular/material/sidenav : module as esm5

Compiling @angular/material/slide-toggle : module as esm5

Compiling @angular/material/slider : module as esm5

Compiling @angular/material/snack-bar : module as esm5

Compiling @angular/material/sort : module as esm5

Compiling @angular/cdk/stepper : module as esm5

Compiling @angular/material/stepper : module as esm5

Compiling @angular/cdk/table : module as esm5

Compiling @angular/material/table : module as esm5

Compiling @angular/material/tabs : module as esm5

Compiling @angular/material/toolbar : module as esm5

Compiling @angular/cdk/tree : module as esm5

Compiling @angular/material/tree : module as esm5

Compiling @angular/material : module as esm5

Expected Behavior

I would expect a smaller bundle like, 2 MiB as I am not using everything, maybe 30%. (So the whole should be 2MiB that uses Angular components and Angular Material components).

Actual Behavior

I see a 2.99 MiB bundle. Or, if I actually use all components, the bundle will be like 8MiB? Why is it bundling tree, chips, table, slider etc. etc ...

Environment

jelbourn commented 5 years ago

Duplicate of #16495. We're removing the @angular/material top-level entry point for v9, so it will be resolved before ivy reaches general availability.

angular-automatic-lock-bot[bot] commented 5 years ago

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.