Compatibility with browserify
In a browserify package, `this` will refer to a node-style exports object, not window. So just reference `window` directly.
This commit is contained in:
parent
60a906a239
commit
e6998948b1
@ -117,7 +117,7 @@ exports.build = function (compsBase32, buildName) {
|
||||
|
||||
var copy = fs.readFileSync('src/copyright.js', 'utf8'),
|
||||
intro = '(function (window, document, undefined) {',
|
||||
outro = '}(this, document));',
|
||||
outro = '}(window, document));',
|
||||
newSrc = copy + intro + combineFiles(files) + outro,
|
||||
|
||||
pathPart = 'dist/leaflet' + (buildName ? '-' + buildName : ''),
|
||||
|
Loading…
Reference in New Issue
Block a user