Skip to content
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

Example for eventsource-polyfill / IE #53

Open
leiming opened this issue Dec 8, 2015 · 13 comments
Open

Example for eventsource-polyfill / IE #53

leiming opened this issue Dec 8, 2015 · 13 comments

Comments

@leiming
Copy link

leiming commented Dec 8, 2015

Could you provide a complete example of working on IE?

I refer the #13 but it's not work.

@glenjamin
Copy link
Collaborator

I don't have easy access to IE, so I won't be able to provide a full working example.

If you have any specific errors then feel free to post more detail

@leiming
Copy link
Author

leiming commented Dec 8, 2015

Thanks for replying.

The full code is https://github.com/leiming/pcgame-react-boilerplate/tree/fix-ie

Just use https://github.com/gaearon/react-transform-boilerplate

and install eventsource-polyfill

npm install eventsource-polyfill --save-dev

and add eventsource-polyfill.js to entries:

// webpack.config.dev.js
// ...
module.exports = {
  devtool: 'eval',
  entry: [
    'eventsource-polyfill',
    'webpack-hot-middleware/client',
    './src/index'
  ],
// ...

and the error as follow:

** 日志: polyfill-eventsource added missing EventSource to window **

errpr

It is running in the virtual machine of Parallels that use IE 8 in windows 7.

@glenjamin
Copy link
Collaborator

If anyone is able to contribute an example including the polyfill for IE, please do.

@glenjamin glenjamin added the docs label Jan 10, 2016
@cl1ck
Copy link

cl1ck commented Jan 20, 2016

Just tested in IE11. The modified webpack config provided by @leiming is working perfectly.
** 日志: polyfill-eventsource added missing EventSource to window ** is not an error, just an that the polyfill was added successfully.

@leiming: I suspect the errors lie somewhere else in your application.

@leiming
Copy link
Author

leiming commented Jan 20, 2016

@cl1ck , This code is work with IE 11, but IE 8 in Win7.

@wuhw
Copy link

wuhw commented Oct 15, 2016

@leiming I just add the 'event-source-polyfill' to the entry chunk and it works

@wuhw
Copy link

wuhw commented Oct 15, 2016

use the npm package named 'event-source-polyfill' and add this to entry chunk without any loader or plugin.
module.exports = {
devtool: 'eval',
entry: [
'event-source-polyfill',
'webpack-hot-middleware/client',
'./src/index'
]
}
then it works for me.
and I check the eventsource-polyfill's source code and I find some error in it. It could'not exports any thing to the window so that you got the error above.

@johnjjung
Copy link

this is ready for review

@glenjamin
Copy link
Collaborator

What is?

@johnjjung
Copy link

Lol whoops sorry wrong Issue

@mtiger95
Copy link

I used the 'babel-polyfill' plugin, it also can't work in IE11 , but when 'npm run build',open the local index files ,it works, How strange ?

@SuLiang2016
Copy link

but fo me,it doesn't work; I use the 'event-source-polyfill' as the example , I don't know where is wrong?

@florida0723

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants