Skip to content

Commit

Permalink
Fix: browser compatibility Merge pull request #268 from ajinkyarajput…
Browse files Browse the repository at this point in the history
…/ajinkyarajput-url-import

Make it browser compatible
  • Loading branch information
joeybaker authored Apr 22, 2022
2 parents 4579961 + a759bc5 commit 9321d5c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# [2.0.1](https://github.com/EventSource/eventsource/compare/v2.0.0...v2.0.1)

* Fix `URL is not a constructor` error for browser ([#268](https://github.com/EventSource/eventsource/pull/268) Ajinkya Rajput)

# [2.0.0](https://github.com/EventSource/eventsource/compare/v1.1.0...v2.0.0)

* BREAKING: Node >= 12 now required ([#152](https://github.com/EventSource/eventsource/pull/152) @HonkingGoose)
Expand Down
1 change: 0 additions & 1 deletion lib/eventsource.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var parse = require('url').parse
var URL = require('url').URL
var events = require('events')
var https = require('https')
var http = require('http')
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"standard": {
"ignore": [
"example/eventsource-polyfill.js"
],
"globals": [
"URL"
]
}
}

0 comments on commit 9321d5c

Please sign in to comment.