Closed
Description
Search Terms
swc options, swc runtime, react automatic
Expected Behavior
There is no way to set swc to use automatic run time in react:
Its not part of the transpiler configs thats passed into swc
- https://github.com/TypeStrong/ts-node/blob/main/src/transpilers/swc.ts
- https://swc.rs/docs/configuration/compilation#jsctransformreactruntime
Actual Behavior
- react 18 with automatic runtime is not supported
- i'm currently using ts-node to run tests: https://github.com/scaffold-eth/eth-hooks
Steps to reproduce the problem
- download repo: https://github.com/scaffold-eth/eth-hooks
- change tsconifg.test.json to use
swc: true
Minimal reproduction
Specifications
- ts-node version: latest
- node version: 16
- TypeScript version: 4.7
- tsconfig.json, if you're using one:
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true
},
"files": ["hardhat.config.ts"],
"ts-node": {
"swc": true,
"compilerOptions": {
"module": "CommonJS"
},
"moduleTypes": {
"**/*": "cjs"
}
}
}
- package.json:
{}
- Operating system and version: mac, latest
- If Windows, are you using WSL or WSL2?:
Metadata
Metadata
Assignees
Labels
No labels