autosuggest-highlight
autosuggest-highlight copied to clipboard
Version 3.3.0 breaks IE11
I have done my research and found out that the latest version of this library (v3.3.0) is breaking Internet Explorer.
In our case, IE11.
The problem is that with this latest version there is some ES6 code coming (like const
).
Hi Please check on latest 3.3.1 version.
Hi again!
Thanks for the prompt answer.
I tried again with the 3.3.1 version, and the error is different. It seems to be located in the remove-accents
library code:
function extend(subject, baseObject) {
subject = subject || {};
THIS LINE IS BREAKING THE BUNDLE IN IE11 ---> Object.keys(subject).forEach((key) => {
baseObject[key] = !!subject[key];
});
return baseObject;
}
It's quite strange because of 3.2.0 version contains same part of a code
function extend(subject, baseObject) {
subject = subject || {};
Object.keys(subject).forEach(function(key) {
baseObject[key] = !!subject[key];
});
return baseObject;
}
And as I see this code was added exactly in 3.2.0. What worked version are you using now?
PS. I tried to build the latest version with and without polyfills, but it increase bundle size from 6K to 60K.
We are using 3.1.1.. Wow, that's a massive increase of bundle size. I'm not sure how to go from there, to be honest.
Hi After consulting with @moroshko I've fixed build and made separated distribs for old and modern browsers. Since 3.3.2 version if you need to support old browsers such IE11, you must import like
var match = require('autosuggest-highlight/ie11/match');
var parse = require('autosuggest-highlight/ie11/parse');
I tried, but I'm getting the following error:
Module not found: Error: Can't resolve 'autosuggest-highlight/ie11/parse' in
...
Checking on the folders created on node_modules
, I don't see anything about ie11
:
I confirmed I have version 3.2.2 on node_modules
:
Hi Sorry for delaying with answer. I've published version 3.3.3 with ie11 modules included.