Skip to content

@astrojs/cloudflare v13 ignores --env during deploy #16040

Description

@mark-mybaggage

Astro Info

Astro                    v6.0.8
Vite                     v7.3.1
Node                     v22.15.0
System                   Windows (x64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/node (v10.0.3)
Integrations             @astrojs/alpinejs (v0.5.0)
                         @astrojs/sitemap (v3.7.1)

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When attempting to deploy an application to a different environment using the --env parameter does not work. This does not happen with @astrojs/cloudflare v12 and earlier. This could be related to the Wrangler configuration file now being optional.

The project contains a wrangler.jsonc file with the name property:

"name": "corp-frontend"

When testing the deploy command is:

npx wrangler deploy --env sneak

The 'sneak' value is ignored and the code is deployed to corp-frontend

What's the expected result?

The expected result is to deploy to:

corp-frontend-sneak

Link to Minimal Reproducible Example

n/a

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions