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

Minified file has broken on IE8 #1063

Closed
1 of 2 tasks
gkatsev opened this issue Jan 31, 2017 · 9 comments
Closed
1 of 2 tasks

Minified file has broken on IE8 #1063

gkatsev opened this issue Jan 31, 2017 · 9 comments
Milestone

Comments

@gkatsev
Copy link

gkatsev commented Jan 31, 2017

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug
  • request a feature

Current behaviour

Steps to reproduce (if the current behaviour is a bug)

Note: the best way to get a quick answer is to provide a failing test case, by forking the following fiddle for example.

Load up the page in IE8 and notice the error in the console about expecing an identifier
errors in ie8

Expected behaviour

No errors

Setup

  • OS: Windows 7
  • browser: IE8
  • socket.io version: 1.7.2

Other information (e.g. stacktraces, related issues, suggestions how to fix)

I found this because karma 1.4.0 started failing on IE8, the investigation and error lead me to socket.io-client, though, now investigating this it seems like it's potentially deeper that the problem occurs.

This must have happened only recently since karma 1.3.0 still works fine. I tried adding screw_ie8: false to the uglify mangle options but it didn't seem to fix it. I'm wondering if some dependency updated to accidentally break IE8 support.

Unfortunately, I can't really investigate any longer right now but I'll try to help out as much as I can.

gkatsev added a commit to gkatsev/video.js that referenced this issue Jan 31, 2017
Karma 1.4.0 indavertantely broke IE8 when updating socket.io.
This pins karma to 1.3.0 a version that is known to work on IE8.

See karma-runner/karma#2556
See socketio/socket.io-client#1063
gkatsev added a commit to videojs/video.js that referenced this issue Jan 31, 2017
Karma 1.4.0 indavertantely broke IE8 when updating socket.io.
This pins karma to 1.3.0 a version that is known to work on IE8.

See karma-runner/karma#2556
See socketio/socket.io-client#1063
@darrachequesne
Copy link
Member

Yes, that has already been reported here: #1040

I can't seem to find the correct uglifyjs configuration though... (#1042)

@gkatsev
Copy link
Author

gkatsev commented Feb 1, 2017

Oh, I thought I looked but I guess I missed that.

The "correct" config is screw_ie8: false under mangle, however, when i tried it it didn't seem to help. I think there's some dependency or something that is doing something that's breaking things.

@mgol
Copy link

mgol commented Feb 15, 2017

@darrachequesne Doesn't --support-ie8 work for UglifyJS?

EDIT: Hmm, that's only a CLI flag, it seems. It's being mapped to screw_ie8: false internally: https://github.com/mishoo/UglifyJS2/blob/1eaa211/bin/uglifyjs#L242-L244

@gkatsev
Copy link
Author

gkatsev commented Feb 15, 2017

I tried it, but I think a dependency of socket.io-client is doing something a bit weird that is now failing in the minified version, even with --support-ie8.
I believe it worked when running it through es3ify but I'm not sure this project wants another dependency and step in the build.

@mgol
Copy link

mgol commented Feb 15, 2017

Not sure if it helps but since you already run Babel you could try to use babel-preset-es3.

@gkatsev
Copy link
Author

gkatsev commented Feb 15, 2017

I believe it didn't help either because it only runs on the current package code :(

@darrachequesne
Copy link
Member

What's weird it that the unminified version currently passes the tests, but even with screw_ie8: false the minified build does not seem to pass, I get a Error: 'document' is null or not an object in IE7/IE8, which I can't make sense of.

@darrachequesne darrachequesne added this to the 2.0.0 milestone Jun 1, 2017
@darrachequesne
Copy link
Member

Closed by #1042.

@gkatsev
Copy link
Author

gkatsev commented Jun 1, 2017

Sweet, I'll check it out.

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

No branches or pull requests

3 participants