Using browserify, I'm attempting to require an already browserified module, but the bundle is not able to resolve the module that has already been browserified.
For example, I have a file bundle-1.js that has been bundled with the command:
browserify -r ./bundle-1:bundle.one > build/bundle.one.js
I have another file, bundle-2.js that has require('bundle.two'), which is bundled with the command:
browserify -r ./bundle-2:bundle.two -x ./build/bundle.one.js > build/bundle.two.js
Attempting to run that last command, produces an error stating Cannot find module 'bundle.one'.
How can I expose the modules from bundle-1 for bundle-2 to use from the module name bundle.one?
I've created a repo for this example here: https://github.com/kand/browserify-bundling-tests