why shouldnt i use next dev / npm run dev to deploy my project
Answered
Asian black bear posted this in #help-forum
Asian black bearOP
im just curious why i should build it and then start it if run dev does the same?
17 Replies
Thrianta
its literally a different environment, may have different behaviors, may enteract with browser differently
.....dont do this please
Answer
its dev man
it compiles everything
it leaks errors
its bad in perf
nothing about dev is good for prod
caching gets fucked
Thrianta
can you get env variables from next js dev?
@Thrianta can you get env variables from next js dev?
hmm not sure, i dont think so but not sure
i dont think nextjs would have a reason to ever make your vars public
Thrianta
I know that was a big thing that next fixed over react but never gave a thought if it applied in prod
or in dev i mean
yea react is all about the client goodiness xD
Thrianta
In my hacker days we use to scope out react projects and snatch env vars from them and run amouk lol
with vercel now being a solid host for demo projects and every ai tool on the planet it sounds like shooting fish in a barrel to get ai keys
anyways @Asian black bear if these solved your questions, mark an answer :D