Skip to content

Commit cfeb6bc

Browse files
committed
chore: Update tsconfig target to ES2021
All targeted browsers support ES2021 syntax. This change provides an immediate bundle size reduction, with the potential for further gains if code is rewritten to take advantage of optional chaining and nullish coalescing. * Optional chaining: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining#browser_compatibility * Nullish coalescing: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing#browser_compatibility
1 parent 453ade3 commit cfeb6bc

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

pages/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
3-
"lib": ["ES2020", "DOM"],
4-
"target": "ES2015",
3+
"lib": ["ES2021", "DOM"],
4+
"target": "ES2021",
55
"declaration": false,
66
"declarationMap": false,
77
"rootDir": ".",

src/test-utils/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"compilerOptions": {
3+
"lib": ["ES2021", "DOM"],
4+
"target": "ES2021",
35
"strict": true,
46
"incremental": true,
57
"types": [],
68
"module": "CommonJS",
7-
"target": "ES2015",
8-
"lib": ["ES2020", "DOM"],
99
"declaration": true,
1010
"allowSyntheticDefaultImports": true,
1111
"outDir": "../../lib/components/test-utils",

tsconfig.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"lib": ["ES2021", "DOM"],
4-
"target": "ES2015",
4+
"target": "ES2021",
55
"types": [],
66
"module": "ES2015",
77
"moduleResolution": "node",
@@ -15,11 +15,5 @@
1515
"incremental": true
1616
},
1717
"include": ["src", "types"],
18-
"exclude": [
19-
"**/__tests__/**",
20-
"src/test-utils/**",
21-
"**/__integ__/**",
22-
"**/__a11y__/**",
23-
"**/__motion__/**"
24-
]
18+
"exclude": ["**/__tests__/**", "src/test-utils/**", "**/__integ__/**", "**/__a11y__/**", "**/__motion__/**"]
2519
}

tsconfig.unit.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
3-
"target": "es2018",
4-
"lib": ["es2020", "dom"],
3+
"lib": ["ES2021", "DOM"],
4+
"target": "ES2021",
55
"types": ["node", "jest", "@testing-library/jest-dom"],
66
"moduleResolution": "node",
77
"downlevelIteration": true,

0 commit comments

Comments
 (0)