feat: spa option,
dev for MPA and SSR apps
We talked about the PR in today's team meeting. We're worried about making Vite preview ever more complex to accommodate future requirements from users like vite-plugin-ssr. We still think that a
I've updated the PR and I believe it resolves all discussions.
I've refactored how we document this: the documentation now lives under
This is somewhat documented at https://vitejs.dev/guide/ssr.html#setting-up-the-dev-server and since the docs now live on that same page, I believe it's enough.
I agree and this is actually what this PR is about: getting Vite's internal SPA assumptions out of the way in order to uncouple Vite from user middlewares.
Telefunc now also adds its RPC middleware to the development and preview servers and it works. I believe that, after this PR, things will be flexible enough to accommodate for all kinds of needs. Some minor tweaks may be needed, but nothing fundamental AFAICT. And, yes, for unreasonable requirements we can answer: write your own CLI.
Alright, I've applied all suggestions. Let me know if I missed something. Also feel free to directly push to the PR.
I'm glad you're excited about this. Thank you both for your helpful reviews.