Incorrect `.env` file with Vite deployment
Hi all,
My aim:
- Cloudflare preview links to run with
- Cloudflare production deployment to run with
My current setup:
- Build command for both:
- Non-prod deploy command:
- Prod deploy command:
Current result:
Both Preview and Production builds load
---
How do I achieve this? I am stuck for the past few days
My aim:
- Cloudflare preview links to run with
.env.development file- Cloudflare production deployment to run with
.env.production fileMy current setup:
./package.json./wrangler.jsoncCloudflare GUI:- Build command for both:
npm run build (I can't change this because of@cloudflare/vite-plugin limitation, source: https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds)- Non-prod deploy command:
npx wrangler versions upload - Prod deploy command:
npx wrangler deployCurrent result:
Both Preview and Production builds load
.env.production.---
How do I achieve this? I am stuck for the past few days
