I’m setting up browserify on an existing lib and one of its dependencies does something like this:
require('./path/to/' + module);
Browserify is complaining about require statements containing expressions. Given I know the exhaustive list of values the variable module can get assigned to, can I tell browserify to bundle those libraries?
You can
bundle.require()the modules directly server-side so long as you don’t mind the warnings about expressions inrequire()printed to stderr.