I have a Vue project built with Vite, and I need to have at least 3 different environment files.
I have:
.env.local.env.development.env.production
As far as I know, when running npm run build (alias for vite build in my project) the build process should pick up the .env.production shouldn't it?. However I'm noticing that it always picks up the .env.local file.
I came across this answer explaining the priorities of the environment files, but does it mean that if there's an .env.local file in the project it will always pick that one unless explicitly stating the mode? (e.g: vite build --mode production)? Or am I doing something incorrectly? Is there a way to make sure running vite build picks up the production file?