Open vsviridov opened 1 year ago
@vsviridov Can you reproduce the case on stackblitz? We have a template in the Frontend section
Can you give me a link for the stackblitz to clone from? Tried setting it up myself I have trouble with stackblitz not being able to find swc
native bindings...
Oh, i thought you have a specific swc template. It looks like it currently doesn't work with stackblitz due to native bindings not being able to be loaded.
On Mon, Mar 13, 2023, 10:55 Sova @.***> wrote:
[image: image] https://user-images.githubusercontent.com/5620073/224787114-75da659e-9cce-47c4-97d8-e9d773d9c294.png
https://github.com/effector/vite-react-template
— Reply to this email directly, view it on GitHub https://github.com/effector/swc-plugin/issues/31#issuecomment-1466631750, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABWD5AWALWUCPYUJ457HPTW35NPFANCNFSM6AAAAAAVXVMLWU . You are receiving this because you were mentioned.Message ID: @.***>
@vsviridov You can clone repository by clicking "Use this template"
But this repository is not configured for SWC. I'll try to find time to extract it into a gist.
You can clone it and modify for your wishes.
Maybe it's due to the fact that unplugin-swc
has an outdated dependency on unplugin@0.6.0
, which expects vite@^2.3.0
, but I'm currently on ^4.1.1
.
This is a bug in the swc-core, Rkyv library used by it sometimes fall into incorrect desirialization of data. That was recently fixed by swc team (they updated rkyv and enabled strict mode).
Since the swc plugins is not backward compatible, effector swc plugin should be build with latest swc-core and host project also should use latest version of both
Found the related issue: https://github.com/swc-project/swc/issues/7209
A fresh generic project with Vite, Effector and Solid, followed the instructions for configuring plugin for this environment from the README (under the Bundlers section).
Application fails in runtime with a syntax error.
Fragment of the emitted code w/o plugin:
and now with the plugin enabled
()=>_$createComponent(App, {})
gets transformed into<>()=>{}
in the render call, and the app fails with a SyntaxErrorVite config
Dependencies