I have a dependency tree like this:
index.js \__ A \__ B \__ C | \__ D \__ E
I want to bundle index.js
and that works fine: browserify --node index.js -o bundle.js
The problem is when one of the dependencies has a dependency. Let's suppose it's D
that has a native dependency (C++ code).
I want to install it manually using npm install D
and make the bundle.js
to really require it from the disk, not from the bundle.js
code.
How can I exclude the D
module from the bundle and make the bundle to require it from the node_modules
?
I tried using --ignore D
, but it returns an empty object when required.
How can I require
a real module from the node_modules
directory (the way like Node's require
does?