webpack-hot-middleware
webpack-hot-middleware copied to clipboard
Example for eventsource-polyfill / IE
Could you provide a complete example of working on IE?
I refer the https://github.com/glenjamin/webpack-hot-middleware/issues/13 but it's not work.
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
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 **
It is running in the virtual machine of Parallels that use IE 8 in windows 7.
If anyone is able to contribute an example including the polyfill for IE, please do.
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.
@cl1ck , This code is work with IE 11, but IE 8 in Win7.
@leiming I just add the 'event-source-polyfill' to the entry chunk and it works
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.
this is ready for review
What is?
Lol whoops sorry wrong Issue
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 ?
but fo me,it doesn't work; I use the 'event-source-polyfill' as the example , I don't know where is wrong?
fuck IE