nksaraf / vinxi

The Full Stack JavaScript SDK
https://vinxi.vercel.app
MIT License
2.14k stars 81 forks source link

Vinxi CLI --mode not working properly #378

Open fitimbytyqi opened 1 month ago

fitimbytyqi commented 1 month ago

Vite's CLI --mode flag gives the ability to build the app based in a certain mode.

if we do npx vite build --mode staging, will pick the .env.staging file if exists. logging import.meta.env.MODE will spit: staging

With Vinxi this is not happening even though it's CLI supports the --mode flag.

I am trying npx vinxi build --mode staging but it's still picking .env.production file if exists or going back to the default .env if not.

AlexErrant commented 1 month ago

What version are you on? Was it not fixed with https://github.com/nksaraf/vinxi/pull/359 ?

fitimbytyqi commented 1 month ago

@AlexErrant Im on the latest version 0.4.3, I saw that someone merged #359 but It is not working.

You can reproduce it yourself by either adding vinxi on an existing vitejs project or testing it on SolidStart or TanstackStart.

This might be useful https://discord.com/channels/722131463138705510/1288777738421010452