这是indexloc提供的服务,不要输入任何密码
Skip to content

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

@MickL

Description

@MickL

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions