I want to create a standalone package for the browser that attaches the exported objects directly to the window object, and not nested under the shell object attached to the window .
By doing this, the browser ignores the window:
browserify main.js --standalone window > bundle.js
The main.js file is as follows:
var ModuleA = require('./module-a.js'); var ModuleB = require('./module-b.js'); module.exports = { ModuleA: ModuleA, ModuleB: ModuleB }
I want both modules to be exposed directly in the global namespace: window.ModuleA and window.ModuleB .
The documentation does not provide an obvious solution.
You can help?
browserify
Razvan caliman
source share