Closed padcom closed 2 years ago
The reason for such behavior is the very simple way of reading arguments and assuming the switch and its value will be 2 separate arguments. Maybe a better solution would be to take the mode
from
export default defineConfig(({ mode }) => { ... })
That way, you don't need to re-parse the command-line arguments..
Thank you for the question, I have fixed this issue in 1.0.3.
Regarding the question why not get the mode parameter from defineConfig, I just want to make it easier for users.
Thank you! You're awesome!
in Vite the
mode
can be specified in two ways:or
When using the latter syntax, no values are present in the resulting
index.html
.