-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EventSourcePolyfill is not defined #129
Comments
I am not using ionic, how show the typical export look like? |
I found the solution: |
@ejerskov , great, thanks |
The solution of @ejerskov didn't worked for me (Angular 8.0.1). The only way I found to make it works was to globally import the event-source-polyfill package. import * as ssePolyfill from 'event-source-polyfill/src/eventsource.min.js';
new ssePolyfill.EventSourcePolyfill(url, opts); However, I have no clue why this global import works while the named import didn't... |
@ejerskov |
Im working in ionic 4.10.2 with angular 7.3.5.
npm install event-source-polyfill
Then added this to the top of my file:
import 'event-source-polyfill/src/eventsource.js'
declare var EventSourcePolyfill: any;
And then using it like this:
I then get the following error:
I've checked that the path is correct. Any other things Im missing?
The text was updated successfully, but these errors were encountered: