-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Refactor build logic to emulate Vite Environment API #12807
base: dev
Are you sure you want to change the base?
Conversation
|
While investigating a migration to Vite's environment API, it became clear that some elements of our architecture make this difficult. The biggest challenge is that our server bundle builds can't be expressed as different environment configs within the same plugin instance, instead relying on the fact that each server bundle build is a completely standalone Vite build.
This PR is a refactor to bring our architecture much closer to how the environment API works so the migration work is much simpler, while also making it feasible to maintain backwards compatibility for Vite 5 until our next major release. The ideal solution I'm aiming for is to emulate the environment API in our custom build setup.