hughsk / envify

:wrench: Selectively replace Node-style environment variables with plain strings.
901 stars 57 forks source link

Configure envify in package.json #54

Closed thinkloop closed 7 years ago

thinkloop commented 7 years ago

Hello,

Thanks for a great lib. Any idea how to pass the "purge" option to envify in package.json config? For example, I thought this would work:

"browserify": {
  "transform": [["envify", "purge"]]
}

Or this:

"browserify": {
  "transform": [["envify", { "purge": true }]]
}

But neither seem to work. Any suggestions?

Thanks!

thinkloop commented 7 years ago

Answered here: https://github.com/hughsk/envify/issues/26#issue-69798439

"browserify": {
    "transform": [
      ["envify", {"_": "purge"}]
    ]
  }