0

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.

1 Answers1

0

I found that setting the insertGlobalVars property on the browserify options works lovely for this. For anyone else wondering go to

Defining global variable for Browserify.

There's example code, too.

romellem
  • 5,792
  • 1
  • 32
  • 64