Development vs Build variables - using Vite

I have a SolidJS site working nicely. In the Vite development environment I have a variable called "server"...

const server = "http://localhost:3020"


but when I want to build it using "npm run build" this variable need to change...

const server = "http://192.168.1.15:3015"


Is there an easy way to set this up to happen automatically, so that I don't need to manually change this variable every time I want to build it?ryan
Was this page helpful?