Upgrade target to es2022 (#27884)

pull/27891/head
Michael Telatynski 2024-08-01 17:14:27 +01:00 committed by GitHub
parent 1424314f12
commit 380ab17932
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View File

@ -10,15 +10,15 @@ module.exports = {
"last 2 Safari versions", "last 2 Safari versions",
"last 2 Edge versions", "last 2 Edge versions",
], ],
include: ["@babel/plugin-transform-class-properties"],
}, },
], ],
"@babel/preset-typescript", ["@babel/preset-typescript", { allowDeclareFields: true }],
"@babel/preset-react", "@babel/preset-react",
], ],
plugins: [ plugins: [
"@babel/plugin-proposal-export-default-from", "@babel/plugin-proposal-export-default-from",
"@babel/plugin-transform-numeric-separator", "@babel/plugin-transform-numeric-separator",
"@babel/plugin-transform-class-properties",
"@babel/plugin-transform-object-rest-spread", "@babel/plugin-transform-object-rest-spread",
"@babel/plugin-transform-optional-chaining", "@babel/plugin-transform-optional-chaining",
"@babel/plugin-transform-nullish-coalescing-operator", "@babel/plugin-transform-nullish-coalescing-operator",

View File

@ -4,9 +4,10 @@
"emitDecoratorMetadata": false, "emitDecoratorMetadata": false,
"resolveJsonModule": true, "resolveJsonModule": true,
"esModuleInterop": true, "esModuleInterop": true,
"useDefineForClassFields": true,
"module": "es2022", "module": "es2022",
"moduleResolution": "node", "moduleResolution": "node",
"target": "es2018", "target": "es2022",
"noUnusedLocals": true, "noUnusedLocals": true,
"sourceMap": false, "sourceMap": false,
"outDir": "./lib", "outDir": "./lib",

View File

@ -4,7 +4,7 @@
"jsx": "preserve", "jsx": "preserve",
"declaration": false, "declaration": false,
"outDir": "./lib/module_system", "outDir": "./lib/module_system",
"lib": ["es2020"], "lib": ["es2022"],
"types": ["node"] "types": ["node"]
}, },
"include": ["./module_system/**/*.ts"] "include": ["./module_system/**/*.ts"]