vite
vite copied to clipboard
Rspack Host -> Vite Remote
I'm trying to create a pnpm workspace with an
- rspack host
- vite remote
Both using react, is this possible and if so are there any examples so I can try to figure out what I'm doing wrong. Thanks!
Hi, can you share your repo please?
https://github.com/swalker326/mf-rspack-vite-interop
I don't have expertise with Rspack but our example looks similar to yours
Clone the repo
pnpm install
pnpm run build
pnpm run preview-vv
You need to refresh the host because the compilation has a race condition
I'm not sure how, but my brain just skipped that example, sorry about that.
No problem, would you like to add a rspack host example in the repo?
Yea, once I get it working I can, okay to rename the rust-vite to rsbuild-vite then add rspack-vite?
I think i'm close, have you run into this issue?
From the rspack host app:
Adding the actual error message so its searchable:
@vitejs/plugin-react can't detect preamble. Something is wrong.
No, I never saw that error message
https://github.com/module-federation/vite/issues/65
close react hmr
As there's been no activity for 30 days, this issue has been flagged as stale. If you'd like it to remain open, please add a comment within the next 7 days. Thank you.