You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the tsconfig generator isn't up to date with modern ts 5.4 standards, where there is a new module: preserve option. module: preserve implies moduleResolution: Bundler, esModuleInterop: true and resolveJsonModules: true, meaning these options no longer needs to be set explicitely
the tsconfig generator still overrides the tsconfig file unnecessarily, as well as sets some quite "poor" defaults (moduleResolution: node should not be used anymore imo, it's old and dated and doesn't support reading package.json#exports conditions)
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000
Available memory (MB): 16384
Available CPU cores: 8
Binaries:
Node: 20.12.0
npm: 10.5.0
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 14.2.0-canary.54 // Latest available version is detected (14.2.0-canary.54).
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.4.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
TypeScript (plugin, built-in types)
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered:
Fixes#64018
Adds support for modern configurations introduced in TS 5.4
Expected output: not modifying the `module`, `esModuleInterop` configs
since `module: preserve` is present
```
We detected TypeScript in your project and reconfigured your tsconfig.json file for you. Strict-mode is set to false
by default.
The following suggested values were added to your tsconfig.json. These values can be changed to fit your project's n
eeds:
- lib was set to dom,dom.iterable,esnext
- allowJs was set to true
- skipLibCheck was set to true
- strict was set to false
- noEmit was set to true
- incremental was set to true
- include was set to ['next-env.d.ts', '**/*.ts', '**/*.tsx']
- exclude was set to ['node_modules']
The following mandatory changes were made to your tsconfig.json:
- isolatedModules was set to true (requirement for SWC / Babel)
- jsx was set to preserve (next.js implements its own optimized jsx transform)
```
---------
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Link to the code that reproduces this issue
https://github.com/juliusmarminge/nextjs-tsconfig-gen
To Reproduce
get this:
Current vs. Expected behavior
the tsconfig generator isn't up to date with modern ts 5.4 standards, where there is a new
module: preserve
option.module: preserve
impliesmoduleResolution: Bundler
,esModuleInterop: true
andresolveJsonModules: true
, meaning these options no longer needs to be set explicitelythe tsconfig generator still overrides the tsconfig file unnecessarily, as well as sets some quite "poor" defaults (moduleResolution: node should not be used anymore imo, it's old and dated and doesn't support reading package.json#exports conditions)
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 8 Binaries: Node: 20.12.0 npm: 10.5.0 Yarn: N/A pnpm: N/A Relevant Packages: next: 14.2.0-canary.54 // Latest available version is detected (14.2.0-canary.54). eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.4.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
TypeScript (plugin, built-in types)
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: