browserify-handbook
browserify-handbook copied to clipboard
globals, but not on window?
Hi,
I am using Browserify in a legacy browser environment, which means that the window namespace is volatile and unsuitable for storing global variables that I want as globals in my bundles (yes, I want that).
So, I need a way to make globals within a build, either per bundle, or for all bundles.
have been googling this for a while, and can't find a suitable solution, any suggestions before I dig into trying to write a plugin that sets stuff on all modules (doable?).
Thanks.
Ok, I think I need to specify: I'm looking for a way to to set a global state-object, not just make variables available within the module scope...