Skip to content

🚀 Feature Request: Detect dev/publish during custom build command #2634

@Ehesp

Description

@Ehesp

Describe the solution

Given the following, where there's a custom build flow:

[build]
command = "custom_cli build"

I'd like to be able to detect whether wrangler dev or wrangler publish has triggered the command, as to do some custom logic in the build command. As far as I can see, it is not possible to detect this at all.

I also tried defining .dev.vars but it seems this is loaded after the custom build command, so I can't use that to detect the environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquick winPotentially easy/straightforward issue to tackle

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions