vike preview
seemingly serves dist/server
- unclear from docs, leads to missed issues with pre-rendering config
#2232
Labels
Description
My understanding is that running
vike preview
always runs a local server based ondist/server
, rather than simply serving the static files indist/client
- even for fully pre-rendered sites.I ran into this as I was using
vike preview
to verify that the production build of a simple app I'm building works well. The app is hosted on GitHub Pages and so is fully pre-rendered.But I had a bug in
+onBeforePrerenderStart.ts
for a certain route, where some of the values of a path parameter were not listed correctly. Testing withvike preview
, this did not come up as an issue because the server bundle didn't rely on+onBeforePrerenderStart.ts
at all. I only realised the problem after deploying the public site and getting a 404 for some URLs.Perhaps the current behavior is the most sensible default - however, I think it should be stated more clearly in the docs and the startup output of the CLI command that this is exactly what's happening.
The text was updated successfully, but these errors were encountered: