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

IE8 Support? #42

Closed
benmaurer opened this issue Feb 23, 2015 · 16 comments
Closed

IE8 Support? #42

benmaurer opened this issue Feb 23, 2015 · 16 comments

Comments

@benmaurer
Copy link

Thanks so much for webpack! Though I've just started using it, my workflow is infinitely simpler. For the style-loader, do you plan to support IE8? ... if so, could the ES6 bind functions in the addStyle function be altered so I don't have to fork the library or use a polyfill?

@sokra
Copy link
Member

sokra commented Feb 28, 2015

You need to use an polyfill...

I don't want to increase size or complexity for old browsers.
Polyfilling is job of the application.

@benmaurer
Copy link
Author

I don't blame you. Stupid IE ...

@szrenwei
Copy link

to author: at least you should put some comments under the style-load. I am a victim, too.

@sokra
Copy link
Member

sokra commented Mar 19, 2015

PR?

@szrenwei
Copy link

I suggest add some warn info under the style loader. point out it not support IE8, and provide a solution. IE8 have a large market share at this time.

@SimenB
Copy link
Contributor

SimenB commented May 4, 2015

@sokra What parts are unsupported under IE8? Is it enough to use extract-text-webpack-plugin?

And we include es5-sh(i/a)m now, is there some way to guarantee that it will be loaded before other things? auto-polyfiller is an option as well, but the same question applies, any way to guarantee it's loaded before the rest of the bundle?

@benmaurer
Copy link
Author

For the style loader, I believe you must include the polyfill before any style-related requires. I assume the same principle applies elsewhere

@SimenB
Copy link
Contributor

SimenB commented May 5, 2015

Ah, that makes sense.

Is it only .bind causing trouble? Or any other parts as well?

@benmaurer
Copy link
Author

Yes i think it's only the bind

@benmaurer
Copy link
Author

Just updated to the newest version -- you'll also need to polyfill filter

@SimenB
Copy link
Contributor

SimenB commented May 6, 2015

Ok, thanks for the update. Stick it in the docs?

@noneven
Copy link

noneven commented Dec 26, 2015

add the filter and bind, that is OK!

if(!Function.prototype.bind){
    Function.prototype.bind = function(){   
        var fn = this, 
        args = [].slice.call(arguments), 
        object = args.shift();   
        return function(){   
            return fn.apply(object,args.concat([].slice.call(arguments)));   
        };   
    };   
}
if (!Array.prototype.filter){
    Array.prototype.filter = function(fun /*, thisp*/){
    var len = this.length;
        if (typeof fun != "function")
            throw new TypeError(); 
            var res = new Array();
            var thisp = arguments[1];
            for (var i = 0; i < len; i++){
                if (i in this){
                    var val = this[i]; // in case fun mutates this
                    if (fun.call(thisp, val, i, this))
                    res.push(val);
                }
            } 
        return res;
    };
}

@es6Test
Copy link

es6Test commented Mar 4, 2016

@coderwin you are missing something, it doesn't compile because of:

arguments

@noneven
Copy link

noneven commented Mar 5, 2016

include es5-sh(i/a)m--> ES5Shim4Webpack

@es6Test
Copy link

es6Test commented Mar 5, 2016

thx

@flyher
Copy link

flyher commented Nov 8, 2016

@coderwin
It's worked after add the filter and bind.
but i change another function , is import 'ES5Shim4Webpack' ,it elso show the error when i '>npm start'.

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

7 participants