Changing the default vite-served HTML page #5202
Unanswered
steveworkman
asked this question in
Q&A
Replies: 1 comment 2 replies
-
were you able to solve it @steveworkman ? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an application that once built produces two different index.html pages for two different brands, for example
index-a.html
andindex-b.html
.The production web server then chooses which of these html files to serve in SPA mode based on the domain that the request is coming from, so www.example.com goes to index-a.html and www.test.com goes to index-b.html
I'm trying to replicate this with the vite dev server, but I can't because the served page is hard-coded as index.html which you can see in the
spaFallback
middleware.I've attempted to override this, but I either get into an infinite redirection loop, or the server never serves the request.
Is there a way to do this with the vite dev server, or should I raise a feature request in the main repo?
Beta Was this translation helpful? Give feedback.
All reactions