Refactor build logic to emulate Vite Environment API#12807
Refactor build logic to emulate Vite Environment API#12807markdalgleish merged 20 commits intodevfrom
Conversation
|
|
🤖 Hello there, We just published version Thanks! |
|
🤖 Hello there, We just published version Thanks! |
|
🤖 Hello there, We just published version Thanks! |
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.