Replies: 2 comments
-
Running into this issue as well 🤔 |
Beta Was this translation helpful? Give feedback.
-
I tried tinkering around with vite and nginx again today and wasn't able to come up with something that could cover everything necessary. It's left me wondering if the current multiple entrypoint implementation in vite is a bit naive or at least optimistic in how it sets out to do things. The current multiple entrypoint implementation can produce a subdirectory-based hosting model, but I'd argue that this isn't what people necessarily want when they think of "multiple entrypoints". For my experimentation today, this made it really difficult to come up with a correct reverse proxy configuration that could route requests correctly. Some scripts were prefixed with my entrypoint path, some were prefixed with I'm still stumped on what to do here, I'd still love to be able to run a single vite server to build multiple applications, but I really want to be able to refer to them by DNS rather than by subdirectory... |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I'm putting an nginx server in front of a vite project running multiple entrypoints as follows:
When I navigate to a domain such as:
https://login.drschwinn.localdev
, I successfully load the root page, but all URLs generated by vite for resources are presumed to be based on being hosted in a subdirectory:Reproduction
https://stackblitz.com/edit/vitejs-vite-r5hbbj
Steps to reproduce
Obviously this requires a local proxy setup, but I've linked an example project with the three entrypoints as a starting point.
Basically take the above project, put any kind of proxy in front of it where a subdomain maps to the subfolder on the vite server.
System Info
Used Package Manager
yarn
Logs
See bug description. 🙂
Validations
Please note: It may be worth taking this bug into consideration along with #10487 and #9236
Beta Was this translation helpful? Give feedback.
All reactions