hidden-require
v0.0.1
Published
stackless unless otherwise requested error
Downloads
2
Readme
hidden-require
This library is intended at hiding and making some dependencies in node libraries optional when bundled in webpack/browserify.
Example:
const hiddenRequire = require('hidden-require');
/*
allow request to be optional to allow for other platforms to shim request
fetch, google app script (UrlFetchApp), etc.. many more
More use cases:
- node-gyp dependencies where there are c/c++ bindings
*/
module.exports = (request = hiddenRequire('request')) => {
...// do something with request and then some
}