Skip to content

Commit b59bb84

Browse files
authored
build: remove dependency on @angular/elements and custom elements polyfill (#22586)
We weren't using `@angular/elements` for anything and the `custom-elements` polyfill was only included because of it.
1 parent 94bb518 commit b59bb84

File tree

8 files changed

+0
-34
lines changed

8 files changed

+0
-34
lines changed

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@
5656
"@angular/common": "^12.0.0-rc.0",
5757
"@angular/compiler": "^12.0.0-rc.0",
5858
"@angular/core": "^12.0.0-rc.0",
59-
"@angular/elements": "^12.0.0-rc.0",
6059
"@angular/forms": "^12.0.0-rc.0",
6160
"@angular/platform-browser": "^12.0.0-rc.0",
6261
"@types/googlemaps": "^3.43.1",
6362
"@types/youtube": "^0.0.42",
64-
"@webcomponents/custom-elements": "^1.1.0",
6563
"core-js-bundle": "^3.8.2",
6664
"material-components-web": "12.0.0-canary.b52196498.0",
6765
"rxjs": "^6.5.3",

packages.bzl

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ ANGULAR_NGCC_BUNDLES = [
3333
("@angular/common", ["common-http-testing.umd.js", "common-http.umd.js", "common-testing.umd.js", "common.umd.js"]),
3434
("@angular/compiler", ["compiler-testing.umd.js"]),
3535
("@angular/core", ["core-testing.umd.js", "core.umd.js"]),
36-
("@angular/elements", ["elements.umd.js"]),
3736
("@angular/forms", ["forms.umd.js"]),
3837
("@angular/platform-browser-dynamic", ["platform-browser-dynamic-testing.umd.js", "platform-browser-dynamic.umd.js"]),
3938
("@angular/platform-browser", ["platform-browser.umd.js", "platform-browser-testing.umd.js", "platform-browser-animations.umd.js"]),

src/dev-app/BUILD.bazel

-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ filegroup(
171171
"@npm//:node_modules/@material/textfield/dist/mdc.textfield.js",
172172
"@npm//:node_modules/@material/tooltip/dist/mdc.tooltip.js",
173173
"@npm//:node_modules/@material/top-app-bar/dist/mdc.topAppBar.js",
174-
"@npm//:node_modules/@webcomponents/custom-elements/custom-elements.min.js",
175174
"@npm//:node_modules/core-js-bundle/index.js",
176175
"@npm//:node_modules/moment/min/moment-with-locales.min.js",
177176
"@npm//:node_modules/rxjs/bundles/rxjs.umd.min.js",

src/dev-app/example/BUILD.bazel

-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ ng_module(
1010
"//src/components-examples",
1111
"//src/components-examples/private",
1212
"//src/material/expansion",
13-
"@npm//@angular/elements",
1413
],
1514
)

src/dev-app/index.html

-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
1313
<link href="theme.css" rel="stylesheet">
1414

15-
<script>
16-
if (window.customElements) {
17-
window.customElements.forcePolyfill = true;
18-
}
19-
</script>
20-
<script src="@webcomponents/custom-elements/custom-elements.min.js"></script>
21-
2215
<!-- FontAwesome for mat-icon demo. -->
2316
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
2417
</head>

src/e2e-app/BUILD.bazel

-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ ng_module(
6565
"//src/material/tabs",
6666
"@npm//@angular/animations",
6767
"@npm//@angular/core",
68-
"@npm//@angular/elements",
6968
"@npm//@angular/forms",
7069
"@npm//@angular/platform-browser",
7170
"@npm//@angular/router",
@@ -111,7 +110,6 @@ concatjs_devserver(
111110
"@npm//kagekiri",
112111
"@npm//material-components-web",
113112
"@npm//moment",
114-
"@npm//@webcomponents/custom-elements",
115113
"//src/material/prebuilt-themes:indigo-pink",
116114
":index.html",
117115
":theme",

src/e2e-app/index.html

-8
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414

1515
<!-- FontAwesome for mat-icon demo. -->
1616
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
17-
18-
<!-- Angular Elements setup. -->
19-
<script>
20-
if (window.customElements) {
21-
window.customElements.forcePolyfill = true;
22-
}
23-
</script>
24-
<script src="@webcomponents/custom-elements/custom-elements.min.js"></script>
2517
</head>
2618
<body>
2719
<e2e-app>Loading...</e2e-app>

yarn.lock

-12
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,6 @@
149149
yaml "^1.10.0"
150150
yargs "^16.2.0"
151151

152-
"@angular/elements@^12.0.0-rc.0":
153-
version "12.0.0-rc.0"
154-
resolved "https://registry.yarnpkg.com/@angular/elements/-/elements-12.0.0-rc.0.tgz#c01e3a00a121e6312240e82164cd941f08d0823e"
155-
integrity sha512-WIwMxNesgpXp12kpfsgz++7oadJ4aQhxFzreqhUnGHGCS0GECbJU8EGSuqyO4TMRP5FZJRDgETRUqysa/wNfgQ==
156-
dependencies:
157-
tslib "^2.1.0"
158-
159152
"@angular/forms@^12.0.0-rc.0":
160153
version "12.0.0-rc.0"
161154
resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-12.0.0-rc.0.tgz#1a1f71be85f8ad4e41a4ef9fe5dbef3bb04a5420"
@@ -2216,11 +2209,6 @@
22162209
"@typescript-eslint/types" "4.14.0"
22172210
eslint-visitor-keys "^2.0.0"
22182211

2219-
"@webcomponents/custom-elements@^1.1.0":
2220-
version "1.4.3"
2221-
resolved "https://registry.yarnpkg.com/@webcomponents/custom-elements/-/custom-elements-1.4.3.tgz#1800d49f38bb4425ebfd160b50115e62776109d7"
2222-
integrity sha512-iD0YW46SreUQANGccywK/eC+gZELNHocZZrY2fGwrIlx/biQOTkAF9IohisibHbrmIHmA9pVCIdGwzfO+W0gig==
2223-
22242212
JSONStream@^1.0.4, JSONStream@^1.2.1:
22252213
version "1.3.5"
22262214
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0"

0 commit comments

Comments
 (0)