Closed webartoli closed 9 months ago
it's incompatible, they changed AST
https://swc.rs/docs/plugin/selecting-swc-core
Latest version of plugin is built with swc_core@0.79.x
I see. I propose to specify @swc/core
as a dependency with supported version instead of optional peer deps.
It's not an option. SWC plugins still experimental, they do not provide semver compatibility for them. There is no way to provide a correct compatibility range, because it is not available ahead of time. In other words, when i built a latest version of the plugin it supported the newest version of swc, and it is not knowable from what version it will stop work until they release this version.
Also nextjs uses SWC under the hood, but not have it in theirs package.json, because they have their own flavor (they build it from rust sources together with some proprietary extensions), so nextjs users will not be happy to have useless swc dependency.
https://github.com/lingui/swc-plugin/releases/tag/4.0.5 built with swc_core@0.87.28 should support @swc/core@1.3.81 ~ @swc/core@1.3.105
Note: this is still not the latest swc_core
available, since this plugin is aligned NextJS releases rather than @swc/core
Last version of
@swc/core
that works with this plugin is1.3.105
.Upgrading to
@swc/core:1.4
or@swc/core:1.3.x
fill fail. OS Windows.as a workaround
@swc/core
version must be fixed as follows: