Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow env variables that are used to detect deployment environment #9860

Open
1 task done
MickL opened this issue Jan 31, 2025 · 0 comments
Open
1 task done

Allow env variables that are used to detect deployment environment #9860

MickL opened this issue Jan 31, 2025 · 0 comments
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@MickL
Copy link

MickL commented Jan 31, 2025

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Which canary version will you have in your reproduction?

2.3.4

Description

At Nitro / Nuxt environment variables are used to automatically determine what deployment environment the build is in, and then using a specific build preset for that environment. This results in a zero configuration build: Deploying Nuxt or Nitro projects to whatever provider (Vercel, Cloudflare, Deno Deploy, etc. etc.) just works automatically.

Unfortunately this doesnt work anymore when Turborepo comes into play because Turborepo removes all env variables that are not set in the globalEnv array (if not using --env-mode=loose).

May it be possible that you dont remove all environment specific variables that are used to determine the build environment by default? You can find a full list of the variables Nitro / Nuxt is using here: https://github.com/unjs/std-env/blob/main/src/providers.ts#L59

Issue at Nitro: nitrojs/nitro#3051

@MickL MickL added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

No branches or pull requests

1 participant