When you edit env variables, they are not updated in the main code. Historically Plugma has used esbuild to bundle the main code. It's more appropriate than Vite as Vite is typically intended for frontend bundling. However Vite has it's own implementation of mananaging env variables. I tried to leverage this to see if I could get Vite to build the main code. There were some challenges, but mainly the biggest issue was it causing the server to crash after quick succession of builds. I don't know if this was an issue of Vite itself, or the issue of having two bundling processes in the same space. It would require more investigation.
When you edit env variables, they are not updated in the main code. Historically Plugma has used esbuild to bundle the main code. It's more appropriate than Vite as Vite is typically intended for frontend bundling. However Vite has it's own implementation of mananaging env variables. I tried to leverage this to see if I could get Vite to build the main code. There were some challenges, but mainly the biggest issue was it causing the server to crash after quick succession of builds. I don't know if this was an issue of Vite itself, or the issue of having two bundling processes in the same space. It would require more investigation.