vite build --mode development creates production build #13660
Unanswered
DevJHansen
asked this question in
Q&A
Replies: 1 comment
-
Try this: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using Rect with vite and when I run
vite --mode development
to run my dev server everything works perfectly. But if I try and build a dev version of my project the mode is always set toproduction
.As you can see from my screen shot it's logged as using development mode during the build, but if I
console.log(import.meta.env)
it saysMODE: production
and it's using the env variables from.env.production
.Does anyone what could be causing this? I haven't been ale to find a solution and any help would be much appreciated.
If it helps, here is my vite.config.ts:
Beta Was this translation helpful? Give feedback.
All reactions