Skip to content

Commit d4ca378

Browse files
committed
refactor(material): remove re-exports from primary entry-point
Removes the re-exports to all secondary entry-points from the Angular Material primary entry-point. BREAKING CHANGE: Components can no longer be imported through "@angular/material". Use the individual secondary entry-points.
1 parent 97ffc80 commit d4ca378

File tree

3 files changed

+7
-57
lines changed

3 files changed

+7
-57
lines changed

src/material/BUILD.bazel

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,12 @@ load(
77
"MATERIAL_TARGETS",
88
"ROLLUP_GLOBALS",
99
)
10-
load("//tools:defaults.bzl", "ng_module", "ng_package")
10+
load("//tools:defaults.bzl", "ng_package", "ts_library")
1111
load("//tools:sass_bundle.bzl", "sass_bundle")
1212

13-
# Root "@angular/material" entry-point.
14-
ng_module(
13+
ts_library(
1514
name = "material",
16-
srcs = glob(
17-
["*.ts"],
18-
exclude = ["**/*.spec.ts"],
19-
),
20-
module_name = "@angular/material",
21-
deps = ["//src/material/%s" % p for p in MATERIAL_PACKAGES] + [
22-
"@npm//@angular/forms",
23-
"@npm//@angular/animations",
24-
],
15+
srcs = ["index.ts"],
2516
)
2617

2718
sass_bundle(
@@ -51,7 +42,7 @@ ng_package(
5142
"//src/material/prebuilt-themes:pink-bluegrey",
5243
"//src/material/prebuilt-themes:purple-green",
5344
],
54-
entry_point = ":public-api.ts",
45+
entry_point = ":index.ts",
5546
entry_point_name = "material",
5647
globals = ROLLUP_GLOBALS,
5748
packages = ["//src/material/schematics:npm_package"],

src/material/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
export * from './public-api';
9+
// primary entry-point which is empty as of version 9. All components should
10+
// be imported through their individual entry-points. This file is needed to
11+
// satisfy the "ng_package" bazel rule which also requires a primary entry-point.

src/material/public-api.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)