I'm looking for a straightforward way to set up environments. I.E. It would be great if I could run npm run dev:local
and npm run dev:staging
which load different environment files which are accessible at runtime via process.env
. In understand it's compiled so I may have to access the variables in a different way. I'm using svelte with rollup straight from sveltejs/template. It should be simple but I see no way of doing it. It's cumbersome, but possible to do with webpack. Is there a simple way to do this?