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"
const server = "http://localhost:3020"
but when I want to build it using "npm run build" this variable need to change...
const server = ""
const server = ""
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 ryan
2 Replies
lxsmnsyc8mo ago
Next Generation Frontend Tooling
davidapple8mo ago
Thanks. I figured it out. This video helped me