Skip to content

inject has higher priority than define #660

@remorses

Description

@remorses

The identifiers for options.define should be replaced before injecting modules in options.inject

Another way to put this: define identifiers should have higher priority than exports in inject

This would prevent many injections from running, for example replacing occurrences of process.env.VAR with define could skip the injection of a ./process.js module

Currently the injections are run first, which also means that the identifiers in define are never used if they are properties of an object exported from a module in inject

Reproduction: https://github.com/remorses/esbuild-inject-overrides-defines

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions