Skip to content
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

Rspack Host -> Vite Remote #165

Open
swalker326 opened this issue Oct 23, 2024 · 9 comments
Open

Rspack Host -> Vite Remote #165

swalker326 opened this issue Oct 23, 2024 · 9 comments

Comments

@swalker326
Copy link

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!

@gioboa
Copy link
Collaborator

gioboa commented Oct 23, 2024

Hi, can you share your repo please?

@swalker326
Copy link
Author

https://github.com/swalker326/mf-rspack-vite-interop

@gioboa
Copy link
Collaborator

gioboa commented Oct 23, 2024

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

@swalker326
Copy link
Author

I'm not sure how, but my brain just skipped that example, sorry about that.

@gioboa
Copy link
Collaborator

gioboa commented Oct 23, 2024

No problem, would you like to add a rspack host example in the repo?

@swalker326
Copy link
Author

Yea, once I get it working I can, okay to rename the rust-vite to rsbuild-vite then add rspack-vite?

@swalker326
Copy link
Author

swalker326 commented Oct 23, 2024

I think i'm close, have you run into this issue?

From the rspack host app:
image

Adding the actual error message so its searchable:

@vitejs/plugin-react can't detect preamble. Something is wrong.

@gioboa
Copy link
Collaborator

gioboa commented Oct 23, 2024

No, I never saw that error message

@zhangHongEn
Copy link
Contributor

#65

close react hmr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants