Vue · Middle · Question 74 of 75
How do you run a Vite build with settings from .env.staging?
- ✓Correct answer:
vite build --mode staging - 2
NODE_ENV=staging vite - 3Rename the file to
.env
Explanation
The mode selects which .env.[mode] file is loaded. import.meta.env.MODE contains the current mode.