Fork me on GitHub

I’m trying to package someone else’s library, but it seems like their export structure is bad. How can I apply some namespacing to I’m new to writing externs, and the structure of this is somewhat different from all the examples.

therabidbanana19:08:28 - maybe what I did recently would be helpful to you: I had to write a custom webpack config file - the

libraryTarget: "var",
library: "ReactDateRange"
namespace the exports in to be ReactDateRange.DateRange... etc


Not sure if that'll directly translate, but I know webpack by default pulled in all the requires necessary to make it work and built a file that exported those vars.


Oh, though for this project it looks like you'll definitely need to build with browserify, so my thing is probably not a good example at all.


react-google-maps seems to be a relevant example here.


Looks like that one used:, and used the browserify "-s ReactGoogleMaps" flag to set up the library on a global var ReactGoogleMaps so that the extern generator could find it