Conversation
|
|
|
Someone should run |
|
I'm not sure if this is a bug? Like you mentioned, it's using This should also be covered in the migration guide though which I missed. EDIT: Unless we say |
|
In dev, a page is always SSR'd, regardless of whether the user chooses to pre-render that page. In preview, when a page is pre-rendered, the page isn't SSR'd and, instead, its HTML is generated at build time and lives in From that perspective, the discrepancy between dev and preview is very much expected. From a technical point of view, I understand this adds an edge case, but I'd argue it's the correct way to do it. |
|
Isn't that Vike specific? In build/preview, you can also choose not to prerender some pages, and handle SSR for the requested pages. Or a hybrid mode where some HTML is prerendered, and some not that goes through SSR. IIUC the discrepancy isn't within Vite. |
Yes, exactly, and that's precisely why both is needed: the SSR middleware + serving static
If Vite's preview doesn't serve The purpose of Vite's preview server is to alleviate users and framework authors from implementing their own preview server and re-inventing the wheel. It's specific to Vike and any (future) framework that (will) want to support partial pre-rendering. This isn't a blocker for Vike and I don't mind re-implementing the |
|
We also talked about this in the meeting and prefer aligning in dev at the meantime. If It also seems like the behaviour you want is the same as So since users can specify |
👍 Makes sense. I tried to make it work with Anyways, the decision to reject this PR makes sense, thus closing. |
Description
The HTML of pre-rendered pages lives in
dist/, therefore it makes sense to serve.htmlfiles also forappType: 'custom'.Additional context
This fixes a regression introduced by #14756.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).