I work with several node.js modules that I need on the client:
index.js:
var sync = require('../lib/sync');
So I decided that a browser might be the best choice. However, combining files works fine, but the browser wraps everything in (function(){my code here})(); that cause Can't find variable: require error. How can I prevent this behavior?
When I remove the wrapper, everything works as expected, without errors.
source share