nuxt-hub / core

Build full-stack applications with Nuxt on CloudFlare, with zero configuration.
https://hub.nuxt.com
Apache License 2.0
993 stars 56 forks source link

NuxtHub Deploy use my local .env values instead in Nuxthub admin dashboard #347

Closed bitmanid closed 4 weeks ago

bitmanid commented 4 weeks ago

Description

When deploying with npx nuxthub deploy, the deployment process appears to override the environment variables set in the NuxtHub admin dashboard with local .env file values. This creates inconsistency in environment management between local development and production deployments.

Current Behavior

Questions

atinux commented 4 weeks ago

Only build time env variables will be overwritten by your local .env (ex: used in nuxt.config.ts)

You can have a .env.prod file for instance for the prod env variables and use npx nuxthub deploy --dotenv .env.prod

bitmanid commented 4 weeks ago

@atinux thanks!