-
SummaryIn Next.js 15.3.4, class static initialization blocks (static {}) are correctly transpiled and work in both next dev and next build. This looks like a regression in how SWC handles class static blocks between 15.3.4 and 15.4.7. Current Behavior:In Next.js 15.4.7 (dev mode): SyntaxError: Unexpected token '{' Expected Behavior:The class static block should be transpiled (as in 15.3.4), and next dev should run without syntax errors. ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hi, Have you tried with 15.5.0? There was one more SWC bump done from 15.4 to 15.5 and I know some bugs had been fixed upstream. |
Beta Was this translation helpful? Give feedback.
Thanks for your suggestion!
I tried 15.5.0 and this issue still exists. I found this issue started appearing from 15.4.1.
I switched to turbopack, and it works correctly. Since turbopack is already stable, I'll just use turbopack directly.