TypeScript 7 Support in Next.js TLDR: You can now enable `experimental.useTypeScriptCli` to use Type

TypeScript 7 Support in Next.js

TLDR:
You can now enable `experimental.useTypeScriptCli` to use TypeScript 7 on next@preview

Details:

TypeScript 7 released with ts-go, very excited about the speedup!

The release is (intentionally) missing the JavaScript API which they're aiming to release in TypeScript 7.1.

Unfortunately that meant that the TypeScript 7 release as-is breaks frameworks integrating TypeScript using the JS API.

Next.js uses the JS API to invoke TypeScript during "next build" and adds additional formatting so that the logs are consistent with other parts of the build.

In order to support TypeScript 7 without a JS API we had to change the way TypeScript is invoked to directly use the installed `tsc` command.

This change is available under experimental.useTypeScriptCli

It's released as part of the Next.js 16.3 Preview.

You can install it using `npm install next@preview`.

Tim的帖子配图 1:TypeScript 7 Support in Next.js TLDR: You can now enable `experimental.useTypeScriptCli` to use Type
← 返回 XPut 首页 保存在 X 查看原帖 ↗