Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove assumptions around having an index.html that are incompatible with SSR #7631

Closed
4 tasks done
benmccann opened this issue Apr 6, 2022 · 3 comments
Closed
4 tasks done
Labels
enhancement: pending triage p2-to-be-discussed Enhancement under consideration (priority)
Milestone

Comments

@benmccann
Copy link
Collaborator

Clear and concise description of the problem

When rendering a page via SSR we cannot assume that Vite will be serving an index.html page. Rather, in SSR the page contents are dynamically generated at runtime. E.g. in SvelteKit we want requests to be served with our middleware and so we have to remove these middlewares that are incompatible.

Suggested solution

Need a cleaner way to disable viteIndexHtmlMiddleware, vite404Middleware, and viteSpaFallbackMiddleware

Might also want to think about whether transformIndexHtml makes sense

Alternative

No response

Additional context

No response

Validations

@benmccann benmccann added this to the 3.0 milestone Apr 6, 2022
@bluwy
Copy link
Member

bluwy commented Apr 6, 2022

Related: #5720

Maybe having a server.middlewares.<middlewareName>: Config | false option would help solve these issues collectively, but now it exposes more options.

@patak-dev patak-dev added the p2-to-be-discussed Enhancement under consideration (priority) label Apr 8, 2022
@brillout
Copy link
Contributor

brillout commented May 7, 2022

There is work about this over there #8061.

@benmccann
Copy link
Collaborator Author

This is mostly done now. See #7665

@github-actions github-actions bot locked and limited conversation to collaborators Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: pending triage p2-to-be-discussed Enhancement under consideration (priority)
Projects
Archived in project
Development

No branches or pull requests

4 participants