enhance-require
In node, modifies the behaviour of require
so that it ignores paths containing .css
, .less
, .scss
, .sass
, and any other paths indicated via the exclude
option.
Outside of node (browserify, webpack, etc.), this function does nothing.
const enhanceRequire = // ignored in node, processed elsewhere// Don't forget to add a browserify transform or similar for non-nodevar pkg = // pkg is the parsed package from the current working directoryenhanceRequire