0

I'm working on a project, which uses a react SSR module (using Vite). Then I'm using a seperate worker which loads my site and there's link /load-ssr which loads the SSR module as a "binding" service of cloudflare. In SSR vite configuration:

plugins: [cloudflare({ viteEnvironment: { name: "ssr" } }), reactRouter()],

The problem I'm being faced is that when in dev mode the react SSR is being run using "react-router dev" on port 6007 while the cloudflare worker is being run on port 8787.

The hmr is not being worked until and unless I refresh the localhost:8787 Can anyone here please tell me that how the HMR can be correctly implemented using Vite+React as binding for cloudflare worker in the dev mode. I can access that on port 6007 but I need to implement inside the worker otherwise getting on port 6007 doesn't make sense as many things in SSR depends on the worker itself.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.