fix(rsc): fix loadModuleDevProxy with @cloudflare/vite-plugin - #993
Conversation
@cloudflare/vite-plugin support@cloudflare/vite-plugin support
@cloudflare/vite-plugin support@cloudflare/vite-plugin support
hi-ogawa
left a comment
There was a problem hiding this comment.
I'm happy to have a fix like this here, but I'm wondering if @cloudflare/vite-plugin's behavior is now breaking conventions of plugin hook lifecycle. Doesn't it currently run resolveId/transform before buildStart? Or is it just for configureServer?
@cloudflare/vite-plugin supportloadModuleDevProxy with @cloudflare/vite-plugin
It doesn't run What it does do now is make a request inside the In this particular case |
I think it's mostly safe, but in the past, I remember there was an issue related to doing transform (e.g. That said, I also agree there's some oddity with what |
Description
Fixes cloudflare/workers-sdk#11359.
These changes defer accessing the dev server URL until it is used. This ensures compatibility with recent versions of
@cloudflare/vite-plugin. Previously, the assumption was made that the server is started before the entry module is transformed but this no longer holds true.