hughsk/envify

Is there a way to specify a custom object?

mbrevda opened this issue · 4 comments

Let's say I'd rather not pollute my process.env. Is there a way to specify my own, custom, object to be operated on?

Yup, from the docs:

b.transform(envify({
  NODE_ENV: 'development'
}))
b.bundle().pipe(output)

cheers! ✨

I'm not sure I was clear. Instead of searching for process.env.myVar, I'd like to search for foo.myVar.

Oh no can't do, that's not within the feature scope of this package. You should probably write your own transform for that. Cheers!

Thanks