I've looked online at how to expose a global variable to the window
object in Browserify but to no avail. All I found was a really dead Stack Overflow question and blogs. Do I have to do this manually or is there a config
option for it like Webpack's libraryTarget
option? I have looked for the answer.
I found that setting the insertGlobalVars
property on the browserify options works lovely for this. For anyone else wondering go to
There's example code, too.