Skip to content

Commit 3f5894e

Browse files
authored
fix: deprecate MaterialModule (#3840)
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.
1 parent 4c407f0 commit 3f5894e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/module.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ const MATERIAL_MODULES = [
7171
ObserveContentModule
7272
];
7373

74+
/** @deprecated */
7475
@NgModule({
7576
imports: [
7677
MdAutocompleteModule.forRoot(),
@@ -111,7 +112,7 @@ const MATERIAL_MODULES = [
111112
})
112113
export class MaterialRootModule { }
113114

114-
115+
/** @deprecated */
115116
@NgModule({
116117
imports: MATERIAL_MODULES,
117118
exports: MATERIAL_MODULES,

0 commit comments

Comments
 (0)