-
Notifications
You must be signed in to change notification settings - Fork 3k
Internet Explorer ES6 function not compiled #1457
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Hi! We are using webpack and babel-loader for our bundles, did you check https://github.com/socketio/socket.io-client/blob/master/support/webpack.config.js ? |
Look at this line, Your webpack compilation in https://github.com/socketio/socket.io-client/blob/master/dist/socket.io.js#L263 |
Would you like me to make a PR ? Or you got this ? You would go 10x faster than me. I am not in a hurry. I just want my visitors from Africa who are using Internet Explorer to have a fully operational app. That's it. |
@tomtom94 I'm afraid I may not understand your issue. We do indeed support browsers down to IE9 by default, maybe your webpack configuration is incorrect? For example, there is no "const" nor arrow functions in the bundle here: https://github.com/socketio/socket.io-client/blob/master/dist/socket.io.js Could you please check? |
I confirm you didn't understand. As you can see in this line https://github.com/socketio/socket.io-client/blob/master/dist/socket.io.js#L263 Your are downloading this module https://github.com/socketio/socket.io-parser and there is no Would you install babel IE11 is a browser better than IE9 👍 |
Otherwise it might just be in module it's just 2 lines of code. https://github.com/socketio/socket.io-client/blob/master/support/webpack.config.js
Many thanks. I would invite you to check it out straight on the socket.io website. https://www.browserling.com/browse/win/7/ie/11/http%3A%2F%2Fsocket.io ===> This page can't be displayed (nginx error has nothing to do with us) we can't make the test in live. Try your module with https://www.browserling.com please IE11 |
@tomtom94 that's indeed weird for the https://socket.io website, the whiteboard demo seems to be working though: https://browserling.com/browse/win/7/ie/11/https%3A%2F%2Fsocketio-whiteboard-zmx4.herokuapp.com%2F (from https://socket.io/demos/whiteboard/) Maybe an unsupported TLS version? That being said, I think the node_modules folder is already included in the babel transpilation, you can find it in the output here: https://github.com/socketio/socket.io-client/blob/master/dist/socket.io.js#L5486-L5887 |
I can tell you. I have the issue in my final bundles. I will look for it. I am not crazy. |
Got it I think. When you make It makes also a require, like if you do Which means you are using Thanks. In you example application https://socketio-whiteboard-zmx4.herokuapp.com you are making a DOM import of your script (transpiled) Which means you can't catch the error bro. This is a pretty critical issue for all the user having a very old computer in Africa, using IE11 or IE9. And I can tell you there are a lot of Windows XP users... You made my day I am good 👍 |
Would you confirm me you got that bug ? I remind you => Just need to install babel in |
Please use babel to transpile the code to ES5/ES3. This is the best tool for this job. More information here: sindresorhus/ama#446 Thanks! |
Fixes browser module resolution in webpack. See issue socketio#1457.
Hi there, I've run into the same issue. But the solution is quite simple. Webpack uses the ES6 build, and by adding a In the meantime, you can use the following workaround by adding an alias to your
Hope this helps! |
Describe the bug
Internet Explorer ES6 function not compiled, which comes from
socket.io-parser
module a dependency ofsocket.io-client
.I have been trying to force the compilation for this specific module, but
babel-loader
can't reach it because I am not making a straight ES6 import ofsocket.io-parser
in my pages.import parser from 'socket.io-parser'
otherwise I would have compiled this module easily :) But I need you to do it for me. And get a top notch module 🥇Expected behavior
I want the javascript bundles to run on Internet Explorer 11, as simple as that.
The text was updated successfully, but these errors were encountered: