Files
react/compiler/packages/babel-plugin-react-compiler/tsconfig.json
mofeiZ 33999c4317 [compiler][be] Test runner (snap) now uses tsup bundled plugin (#32758)
Currently, `babel-plugin-react-compiler` is bundled with (almost) all
external dependencies. This is because babel traversal and ast logic is
not forward-compatible. Since `babel-plugin-react-compiler` needs to be
compatible with babel pipelines across a wide semvar range, we (1) set
this package's babel dependency to an early version and (2) inline babel
libraries into our bundle.

A few other packages in `react/compiler` depend on the compiler. This PR
moves `snap`, our test fixture compiler and evaluator, to use the
bundled version of `babel-plugin-react-compiler`. This decouples the
babel version used by `snap` with the version used by
`babel-plugin-react-compiler`, which means that `snap` now can test
features from newer babel versions (see
https://github.com/facebook/react/pull/32742).

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32758).
* #32759
* __->__ #32758
2025-03-26 14:27:42 -04:00

37 lines
971 B
JSON

{
"extends": "@tsconfig/strictest/tsconfig.json",
"compilerOptions": {
"module": "ES2015",
"moduleResolution": "Bundler",
"rootDir": "src",
"noEmit": true,
"jsx": "react-jsxdev",
// weaken strictness from preset
"importsNotUsedAsValues": "remove",
"noUncheckedIndexedAccess": false,
"noUnusedParameters": false,
"useUnknownInCatchVariables": true,
"target": "ES2015",
// ideally turn off only during dev, or on a per-file basis
"noUnusedLocals": false,
"removeComments": true,
"declaration": true,
},
"exclude": [
"node_modules",
"src/__tests__/fixtures"
],
"include": [
"src/**/*.ts"
],
"ts-node": {
"transpileOnly": true,
// these options are overrides used only by ts-node
// same as the --compilerOptions flag and the TS_NODE_COMPILER_OPTIONS environment variable
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
}
}
}