Skip to content

Package configurations taking priority over environment variables #33

@Enet4

Description

@Enet4

I have a use case where I would like environment variable definitions to override properties to envify, the default values of which would be contained in the package.json file. Something like this:

  "scripts" {
    "build-yes": "MY_VAR=YES browserify .",
    "build": "browserify ."
  },
  "browserify": {
    "transform": [
      "babelify",
      "browserify-shim",
      [
        "envify",
        {
          "MY_VAR": "NO"
        }
      ]
    ]
  }

Unfortunately, the re-definition derived from the script "build-yes" does not take place. Removing the definition of "MY_VAR":"NO" in the package is the only way for "MY_VAR=YES" to reach the transform. Is this the desired behaviour? Could these priorities be reconsidered?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions