-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work in NextJS 13.2.4 #39
Comments
HI @rwu823, could you please check the nextjs-13 example project? Is it reproducible on this project? If so, please share more details about the error and the steps to reproduce |
i believe they simply bumped a bundled version of SWC, so now layout of AST is not compatible with current compiled version. |
@andrii-bodnar The nextjs-13 example doesn't upgrade to the latest next. https://github.com/lingui/swc-plugin/blob/main/examples/nextjs-13/package.json#L20 "next": "13.1.2", Probably as @thekip said that AST is not compatible. |
Yep, the plugin doesn't work with @swc/core >= 1.3.39. |
FYI: SWC devs created a plugin compatibility page https://swc.rs/docs/plugin/selecting-swc-core Unfortunately bumping a version of swc core did not resolve an issue. Continue to investigate |
I may be missing something but it seems that NextJS 13.2.4 is using @swc/core 1.2.203 (https://github.com/vercel/next.js/blob/v13.2.4/package.json) and the @lingui/swc-plugin is breaking it, so it is not only for @swc/core >= 1.3.39 |
Current stable version of the plugin compiled with swc_core "0.56.1" that according to Selecting swc_core |
Do you guys know any custom SWC plugins which works with latest nextjs? I want to take it as an example. |
For those who feel lucky and brave, i build plugin with latest (0.72.0) swc_core. It for some reason doesn't work on my machine, but maybe it depends on aarch would work on your machine. Or with plain SWC (not a next-swc) How to use:
|
I'm getting this in my project 🙇🏼 any ideas how to fix |
Downgrade to nextjs < 13.2.4 |
Looks like v13.3.1-canary.12 fixes this issue. |
@TimFL did you try the current version of a plugin with canary release, or just noticed that the fix was merged by nextjs team? I'm asking because whont to know should i rebuild plugin with latest swc-core to support v13.3.1-canary.12 or it works as is. |
I'm sorry for the confusion, I meant: that release fixes the swc problems, but plugin devs have to update their libraries so they work again. This needs updating now. |
I've tested the latest version of swc_core (0.75) with the newest next.js canary release, and I can confirm that the wasm file can be executed without any issues. |
v4 is relased officially and it's already built with latest |
@pawanrana1992 please read compatibility table carefully. The plugins indeed work with nextjs 13.*. You need to choose the right version of both. SWC plugins is experimental feature, they DO BREAK backward compatibility in patch and minor releases, so you need to choose an exact version of nextjs |
Adding this swc plugin causes the next dev server to fail to start.
It is worked fine before upgrading Next.js
The text was updated successfully, but these errors were encountered: