You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we might run a built Vite site in a number of different locations. It would be convenient to have vite support for setting the public base path dynamically rather than just at build time.
Suggested solution
As with __webpack_public_path__, vite could expose a global __vite_public_path__ variable that could be set and would automatically update all asset references throughout the app.
Alternative
We currently implement this in Nuxt using a vite plugin, but it would be great to have built-in support upstream.
I would be very willing to implement this if it's in line with the project roadmap.
I actually asked a question there which no-one had answered. I'm assuming you had already considered base: './', and finally when with this approach, and if that's the case it would be good to implement then. Still I would be interested to know if base: './' had worked for you? 🤔
To be safe, I can put this in the team board too and we can discuss about it first.
Clear and concise description of the problem
Sometimes we might run a built Vite site in a number of different locations. It would be convenient to have vite support for setting the public base path dynamically rather than just at build time.
Suggested solution
As with
__webpack_public_path__
, vite could expose a global__vite_public_path__
variable that could be set and would automatically update all asset references throughout the app.Alternative
We currently implement this in Nuxt using a vite plugin, but it would be great to have built-in support upstream.
I would be very willing to implement this if it's in line with the project roadmap.
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: