Support typescript-go for builds #81472
Replies: 6 comments 3 replies
-
|
the 'what works so far' section in the tsgo repo is relevant here. curious what bits next will need to wait on. huge win if local dev page compile times could be faster. this is a real log from my local dev experience in a big monorepo frontend:
|
Beta Was this translation helpful? Give feedback.
-
|
For running typecheck you can still do tsgo --noEmit and this will be way faster than tsc. The type checking in your live dev builds is incremental anyway so not a lot of performance to be gained after initial compilation. Will speed up next compiles once it's fully integrated but a lot of speed from incorporating tsgo into the flow as it is. |
Beta Was this translation helpful? Give feedback.
-
|
any updates on this? |
Beta Was this translation helpful? Give feedback.
-
|
TS 7.0 in beta now!
-- https://devblogs.microsoft.com/typescript/announcing-typescript-7-0-beta/ |
Beta Was this translation helpful? Give feedback.
-
|
This is really exciting timing because TypeScript 7.0 just hit beta on April 21, 2026 (https://devblogs.microsoft.com/typescript/announcing-typescript-7-0-beta/). The beta is available right now under the The performance numbers are genuinely staggering. On the Sentry codebase for example, a full build went from 133 seconds with tsc 6.0 down to 16 seconds with tsgo, roughly an 8x speedup. The gains come from two sources working together: native code compiled to machine code via Go (no JIT warmup or Node.js overhead), and parallel type checking with four workers running concurrently by default. For Next.js integration specifically, I think the path forward might be cleaner than it seems. As @evanreilly noted above, local dev builds already use SWC for type stripping, so the immediate win is really about the One thing worth tracking is that tools like The microsoft/typescript-go repo (https://github.com/microsoft/typescript-go) has a "what works" tracker that is worth monitoring for when Next.js could flip the switch safely. Would love to see this become a first-class option in the |
Beta Was this translation helpful? Give feedback.
-
|
Couldn't build after moving to the TS 7 RC (https://devblogs.microsoft.com/typescript/announcing-typescript-7-0-rc/). Worth flagging: the native-compiler detection in verify-typescript-setup.js only looks for Workaround that's been holding up fine: add Would be great if the detector also recognized |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
When building a Next.js app, it would be great to run the typecheck with the native preview,
tsgo.This would drastically improve build times.
Proposal
I attempted to make this work locally by updating
node_modules/next/, specifically by adding@typescript/native-previewas an item here, and changing thetsPathfrom'typescript'to'@typescript/native-preview'here. This didn't quite work, so there is probably more effort needed here.Beta Was this translation helpful? Give feedback.
All reactions