Commit d18924b
fix(init): emit ESM-compatible tsconfig for TypeScript projects (#5596)
`codecept init` installs tsx and sets `require: ['tsx/cjs']`, but the
generated tsconfig.json still carried the legacy ts-node setup:
- a `"ts-node": { files: true }` block, though ts-node is never installed
and is marked "not recommended" in loaderCheck.js
- `"module": "commonjs"`, wrong for an ESM ("type": "module") project
Generate a tsconfig that matches the tsx/ESM setup init already configures:
drop the ts-node block, use `module: ESNext` with `moduleResolution: bundler`
(so extensionless imports resolve as tsx/docs expect), and bump target/lib
to ES2022.
Co-authored-by: DavertMik <davert@testomat.io>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 06cdb0c commit d18924b
1 file changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | 248 | | |
252 | | - | |
253 | | - | |
| 249 | + | |
| 250 | + | |
254 | 251 | | |
255 | | - | |
| 252 | + | |
| 253 | + | |
256 | 254 | | |
257 | 255 | | |
258 | 256 | | |
| |||
0 commit comments