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

Not working for Nestjs with socket #111

Open
Jedliu opened this issue Jun 2, 2024 · 1 comment
Open

Not working for Nestjs with socket #111

Jedliu opened this issue Jun 2, 2024 · 1 comment

Comments

@Jedliu
Copy link

Jedliu commented Jun 2, 2024

Hi, thanks for this great plugin. This works well until I add the socket with Nestjs.
I have a working demo here nestjs-vite-demo.

Socket is working with Nest default cli.

1- Start the server

pnpm run start

2- Visit the page localhost:3000. You will see the client page.
image
The status shows the client is connected to the socket server, and you can click Send Message to send the message to the server and get the reply from the server.

Here are the steps to reproduce the problem.

1- Start the server with vite

pnpm run start:vite

2- Visit the page localhost:3000. The client will never connect to the server.
image

Possible solution.

#87 I can't get the production build working with Vite. I will report on the other issue as well.

I hope someone can give a hint on how to solve this. Thank you!

@Jedliu
Copy link
Author

Jedliu commented Jun 2, 2024

By the way, the socket test runs well with vitest.

pnpm run test:vitest

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

1 participant