Basic example with vite-plugin-ssr doesn't seem to work
I've finally started integrating vite-plugin-ssr in my vite-plugin-cloudflare project and have been running into some issue.
Decided to take a step back and attempt the VPS example from this repo, but that doesn't seem to work either. I'm hoping I'm doing something wrong! I've got a copy of the example in this repo.
When running npm run dev and accessinh /, the page renders:
could not find index.html in your content namespace
And the console output is:
Error: [[email protected]][Wrong Usage] Cannot find production build. Did you to run `$ vite build`? If you did, then you may need to use `importBuild.cjs`, see https://vite-plugin-ssr.com/importBuild.cjs
Any idea what might be happening?
Thanks for the issue, Sure, let me check what's happening!
Yes, it's an issue with an update of vps, because it works completely ok with "vite-plugin-ssr": "0.4.18"! Anyways, I'll see how I can solve it.
cc @brillout
No, it's still not working in your repo, even with the downgrade :smile:
I did npm run build and then npm run dev and everything is working! Is there any specific issue?
Yes, but it shouldn't require npm build to work right?
Otherwise it defeats the point of vite-plugin-cloudflare's great DX if you have to run npm build every change.
When you start a new project, you need the build, as far as I know, only the first time! I tried it in your repo one time, and after that, everything started working, with module reloads also! It does not need that on any change any more.
Let me know if that's the case for you. And also I'd like to see if that's expected for vps or not. Because on our end, we cannot do anything at least for now, unless otherwise is proven.