This enables `allowDeclareFields` flag that allows code like:
```ts
class Foo {
declare prop: string;
}
```
Declaring is a workaround for inheritance vs property initialization
issues.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#the-usedefineforclassfields-flag-and-the-declare-property-modifier
For `allowDeclareFields` to work, we have to run
plugin-transform-typescript before plugin-proposal-class-properties and
few others, so this change migrates from preset-typescript that always
runs last to individual plugin-transform-typescript, and reorders some
plugins.
References #21119.
41 lines
1.7 KiB
JSON
41 lines
1.7 KiB
JSON
{
|
|
"name": "babel-bundle",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"scripts": {
|
|
"esbuild": "esbuild ./src/babelBundleImpl.ts --bundle --outdir=../../lib/common --format=cjs --platform=node --target=ES2019",
|
|
"build": "npm run esbuild -- --minify",
|
|
"watch": "npm run esbuild -- --watch --sourcemap",
|
|
"generate-license": "node ../../../../utils/generate_third_party_notice.js"
|
|
},
|
|
"dependencies": {
|
|
"@babel/code-frame": "^7.18.6",
|
|
"@babel/core": "^7.20.2",
|
|
"@babel/helper-plugin-utils": "^7.20.2",
|
|
"@babel/parser": "^7.20.3",
|
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
"@babel/plugin-proposal-dynamic-import": "^7.18.6",
|
|
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
|
"@babel/plugin-proposal-logical-assignment-operators": "^7.18.9",
|
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
|
"@babel/plugin-proposal-numeric-separator": "^7.18.6",
|
|
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
|
|
"@babel/plugin-proposal-private-methods": "^7.18.6",
|
|
"@babel/plugin-proposal-private-property-in-object": "^7.18.6",
|
|
"@babel/plugin-syntax-async-generators": "^7.8.4",
|
|
"@babel/plugin-syntax-import-assertions": "^7.20.0",
|
|
"@babel/plugin-syntax-json-strings": "^7.8.3",
|
|
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
|
|
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
|
|
"@babel/plugin-transform-modules-commonjs": "^7.19.6",
|
|
"@babel/plugin-transform-react-jsx": "^7.20.7",
|
|
"@babel/plugin-transform-typescript": "^7.20.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/babel__code-frame": "^7.0.3",
|
|
"@types/babel__core": "^7.1.20",
|
|
"@types/babel__helper-plugin-utils": "^7.10.0",
|
|
"@types/babel__traverse": "^7.18.2"
|
|
}
|
|
}
|