1.0.2 • Published 3 years ago
environmentify v1.0.2
environmentify
Replace process.env environment variables when using browserify.
Installation
npm install --save-dev environmentify
Example
export TEST=hello
browserify -t environmentify -o bundled.js index.js
// index.js
console.log(process.env.TEST)
console.log(process.env['TEST'])
console.log(process.env.NOTHING)
// bundled.js
console.log("hello")
console.log("hello")
console.log(undefined)