From 35583de49c5014d98b464389ff08eabe17dd74d7 Mon Sep 17 00:00:00 2001 From: Jeremy Elbourn Date: Wed, 29 Mar 2017 18:17:54 -0700 Subject: [PATCH] fix: deprecate MaterialModule 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. --- src/lib/module.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/module.ts b/src/lib/module.ts index da1eea31c87c..245574325ebe 100644 --- a/src/lib/module.ts +++ b/src/lib/module.ts @@ -71,6 +71,7 @@ const MATERIAL_MODULES = [ ObserveContentModule ]; +/** @deprecated */ @NgModule({ imports: [ MdAutocompleteModule.forRoot(), @@ -111,7 +112,7 @@ const MATERIAL_MODULES = [ }) export class MaterialRootModule { } - +/** @deprecated */ @NgModule({ imports: MATERIAL_MODULES, exports: MATERIAL_MODULES,