[@cloudflare/vite-plugin] React Router V7 with prerendering supported? #13554
Replies: 10 comments
-
|
Yes, this is expected. We are considering the best way to support this and will keep this issue updated. Thanks. |
Beta Was this translation helpful? Give feedback.
-
|
ok ty i thought i was going crazy. |
Beta Was this translation helpful? Give feedback.
-
|
@jamesopstad hi i'm wondering if the better way would be to treat this as a problem with node and shimming loaders for mocked version of the cloudflare imports |
Beta Was this translation helpful? Give feedback.
-
|
Are there any plans for this? I tried to use react router v7 prerender on my Shopify Hydrogen project and couldn't. After a ton of research, I think it's related to this issue. Is this actively being worked on? |
Beta Was this translation helpful? Give feedback.
-
|
@ProgramYourFace ya i don't use the vite-plugin for this reason. there's a fundamental issue in that the vite-plugin kills the part of the build process that renders the the routes on the in the ssr phase so that it never gets to the prerender. and because of the way cloudflare requires a durable object's class to be exported from the main module if you try to define a DO in the same project as the rrv7 it will try to resolve the "cloudflare:workers" module in the prerender phase. thats how the vite plugin solved it. |
Beta Was this translation helpful? Give feedback.
-
|
Any update on this, because prerender is still broken :( |
Beta Was this translation helpful? Give feedback.
-
|
We are actively working with the React Router team right now on prerendering support and will share more once we have something you can play with. |
Beta Was this translation helpful? Give feedback.
-
|
@edmundhung any update on this pls. |
Beta Was this translation helpful? Give feedback.
-
|
We are working with them to finalize the details. You can follow remix-run/react-router#14650 for the latest updates. |
Beta Was this translation helpful? Give feedback.
-
|
Hello @edmundhung , I see the issue is merged in React Router repo , any update on when CF will officially support it |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the solution
Just checking if this will need a bug report but the new vite plugin works great with the starter but prerender doesn't seem to work? is this intentional?
I'll post a bug report if it supposed to be.
Beta Was this translation helpful? Give feedback.
All reactions