From fa2903718ce77556419bb42fb60e4923e96c9999 Mon Sep 17 00:00:00 2001 From: Mohsen Date: Fri, 24 Jun 2016 16:25:04 +0430 Subject: [PATCH] Target modules in node_modules for envify/custom Sample code for `envify/custom` did not apply envify to the modules in node_modules. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 37f2c65..22602e7 100644 --- a/README.md +++ b/README.md @@ -100,10 +100,13 @@ var b = browserify('main.js') b.transform(envify({ NODE_ENV: 'development' -})) +}), {global: true}) b.bundle().pipe(output) ``` +Passing `{global: true}` as second argument is required for browserify to transform +modules included in `node_modules`. + ## Purging `process.env` ## By default, environment variables that are not defined will be left untouched.