next.js
fb83b834 - Turbopack: run styled-jsx after typescript transform (#82359)

Commit
263 days ago
Turbopack: run styled-jsx after typescript transform (#82359) Closes PACK-5183 Based on https://github.com/swc-project/swc/issues/10944#issuecomment-3120775091, we need to run styled-jsx after typescript Fixes this crash ``` entered unreachable code: This visitor does not support TypeScript. This method fails for optimization purposes. Encountered in unreachable visitor: visit_ts_interface_decl ``` This has become more pressing as swc seems to have turned the debug_assertion into a proper panic/crash in recent versions (I was seeing SIGSEGV when building some app): https://vercel.slack.com/archives/C03EWR7LGEN/p1754390155508789?thread_ts=1753477535.369549&cid=C03EWR7LGEN We now have three phases/stages: - preprocess: to strip typescript/decorators (so to normalize the syntax) - main: for transforms that want to operate on "standard" EcmaScript (though still with raw JSX) - postprocess: react transform, preset-env, etc (so low level "codegen")
Author
Parents
Loading