Skip to content

Commit

Permalink
fix: deprecate MaterialModule (#3840)
Browse files Browse the repository at this point in the history
We've found that, with the current state of tree-shaking in the world,
that using an aggregate NgModule like `MaterialModule` leads to tools
not being able to eliminate code for components that aren't used.

In order to ensure that users end up with the smallest code size
possible, we're deprecating MaterialModule, to be removed in the a
subsequent release.

To replace `MaterialModule`, users can create their own "Material"
modul within their application (e.g., `GmailMaterialModule`) that
imports only the set of components actually used in the application.
  • Loading branch information
jelbourn authored Apr 5, 2017
1 parent 4c407f0 commit 3f5894e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const MATERIAL_MODULES = [
ObserveContentModule
];

/** @deprecated */
@NgModule({
imports: [
MdAutocompleteModule.forRoot(),
Expand Down Expand Up @@ -111,7 +112,7 @@ const MATERIAL_MODULES = [
})
export class MaterialRootModule { }


/** @deprecated */
@NgModule({
imports: MATERIAL_MODULES,
exports: MATERIAL_MODULES,
Expand Down

0 comments on commit 3f5894e

Please sign in to comment.