Closed thebuilder closed 1 year ago
I will have a look later today, never tested the plugin in these conditions. Would be very helpful if you can spin up a stackblitz with your vite setup and a dummy component
Yeah I understand - I got a fairly complex setup, but I think it should be possible to replicate with a basic Vite middleware boilerplate example.
I tried setting up a StackBlitz container, but it fails to run after installing this package: https://stackblitz.com/edit/vitejs-vite-jj3dbh?file=package.json
Is there a known issue with StackBlitz and SWC?
Error: Bindings not found.
at Compiler.eval (file:///home/projects/vitejs-vite-jj3dbh/node_modules/.pnpm/@swc+core@1.3.21/node_modules/@swc/core/index.js:225:19)
at Generator.next (<anonymous>)
at eval (file:///home/projects/vitejs-vite-jj3dbh/node_modules/.pnpm/@swc+core@1.3.21/node_modules/@swc/core/index.js:34:71)
Oh yeah true that stackblitz doens't support swc for now. I will clone the repo and loot at it. Thanks
Hey - This is cool addition to Vite. Trying the Vite 4 beta on a solution, where Vite is running through a middleware to do serverside rendering.
I have the following code, to inject the React preamble. For some reason, it seems like the plugin tries to instantiate it.
Results in me getting:
Seems to be caused by this specific line (inside the template string):
If i remove that from the preamble, it renders correctly.
I've tried a few different scenarios, and it seems that the line being anywhere inside the code causes it to fail.
As a comment
As a string
Without assignment
If change it to something else, like
window.$RefreshRg$
, the site renders.