Skip to content

Commit 279e7d4

Browse files
JeanMechethePunderWoman
authored andcommitted
refactor: cleanup polyfills by importing zone.js directly in angular.json (angular#48380)
Since v15, polyfills can be passed directly into angular.json. Let's use this opportunity to reduce the number of unecessary files. PR Close angular#48380
1 parent d703847 commit 279e7d4

49 files changed

Lines changed: 105 additions & 827 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

goldens/size-tracking/integration-payloads.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"cli-hello-world": {
33
"uncompressed": {
4-
"runtime": 1083,
4+
"runtime": 908,
55
"main": 124531,
66
"polyfills": 33824
77
}
@@ -18,7 +18,7 @@
1818
},
1919
"cli-hello-world-ivy-compat": {
2020
"uncompressed": {
21-
"runtime": 1102,
21+
"runtime": 930,
2222
"main": 131519,
2323
"polyfills": 33957
2424
}
@@ -32,29 +32,29 @@
3232
},
3333
"cli-hello-world-lazy": {
3434
"uncompressed": {
35-
"runtime": 2835,
35+
"runtime": 2734,
3636
"main": 225991,
3737
"polyfills": 33842,
3838
"src_app_lazy_lazy_routes_ts": 487
3939
}
4040
},
4141
"forms": {
4242
"uncompressed": {
43-
"runtime": 1060,
43+
"runtime": 888,
4444
"main": 156411,
4545
"polyfills": 33915
4646
}
4747
},
4848
"animations": {
4949
"uncompressed": {
50-
"runtime": 1070,
50+
"runtime": 898,
5151
"main": 156355,
5252
"polyfills": 33897
5353
}
5454
},
5555
"standalone-bootstrap": {
5656
"uncompressed": {
57-
"runtime": 1090,
57+
"runtime": 918,
5858
"main": 83452,
5959
"polyfills": 33945
6060
}

integration/animations/angular.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"outputPath": "dist",
1717
"index": "src/index.html",
1818
"main": "src/main.ts",
19-
"polyfills": "src/polyfills.ts",
19+
"polyfills": [
20+
"zone.js"
21+
],
2022
"tsConfig": "tsconfig.app.json",
2123
"aot": true,
2224
"assets": [
@@ -87,7 +89,10 @@
8789
"builder": "@angular-devkit/build-angular:karma",
8890
"options": {
8991
"main": "src/test.ts",
90-
"polyfills": "src/polyfills.ts",
92+
"polyfills": [
93+
"zone.js",
94+
"zone.js/testing"
95+
],
9196
"tsConfig": "tsconfig.spec.json",
9297
"karmaConfig": "karma.conf.js",
9398
"assets": [

integration/animations/src/polyfills.ts

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

integration/animations/tsconfig.app.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"types": []
66
},
77
"files": [
8-
"src/main.ts",
9-
"src/polyfills.ts"
8+
"src/main.ts"
109
],
1110
"include": [
1211
"src/**/*.d.ts"

integration/animations/tsconfig.spec.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
]
99
},
1010
"files": [
11-
"src/test.ts",
12-
"src/polyfills.ts"
11+
"src/test.ts"
1312
],
1413
"include": [
1514
"src/**/*.spec.ts",

integration/cli-elements-universal/angular.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"outputPath": "dist/cli-elements-universal/browser",
2121
"index": "src/index.html",
2222
"main": "src/main.ts",
23-
"polyfills": "src/polyfills.ts",
23+
"polyfills": [
24+
"zone.js/dist/zone"
25+
],
2426
"tsConfig": "tsconfig.app.json",
2527
"aot": true,
2628
"assets": [
@@ -84,7 +86,9 @@
8486
"builder": "@angular-devkit/build-angular:karma",
8587
"options": {
8688
"main": "src/test.ts",
87-
"polyfills": "src/polyfills.ts",
89+
"polyfills": [
90+
"zone.js/dist/zone"
91+
],
8892
"tsConfig": "tsconfig.spec.json",
8993
"karmaConfig": "karma.conf.js",
9094
"assets": [

integration/cli-elements-universal/src/polyfills.ts

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

integration/cli-elements-universal/tsconfig.app.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"types": []
77
},
88
"files": [
9-
"src/main.ts",
10-
"src/polyfills.ts"
9+
"src/main.ts"
1110
],
1211
"include": [
1312
"src/**/*.d.ts"

integration/cli-elements-universal/tsconfig.spec.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
]
99
},
1010
"files": [
11-
"src/test.ts",
12-
"src/polyfills.ts"
11+
"src/test.ts"
1312
],
1413
"include": [
1514
"src/**/*.spec.ts",

integration/cli-hello-world-ivy-compat/angular.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"outputPath": "dist",
1717
"index": "src/index.html",
1818
"main": "src/main.ts",
19-
"polyfills": "src/polyfills.ts",
19+
"polyfills": [
20+
"zone.js"
21+
],
2022
"tsConfig": "tsconfig.app.json",
2123
"aot": true,
2224
"assets": ["src/favicon.ico", "src/assets"],
@@ -79,7 +81,10 @@
7981
"builder": "@angular-devkit/build-angular:karma",
8082
"options": {
8183
"main": "src/test.ts",
82-
"polyfills": "src/polyfills.ts",
84+
"polyfills": [
85+
"zone.js",
86+
"zone.js/testing"
87+
],
8388
"tsConfig": "tsconfig.spec.json",
8489
"karmaConfig": "karma.conf.js",
8590
"assets": ["src/favicon.ico", "src/assets"],

0 commit comments

Comments
 (0)