Closed dav11d closed 5 years ago
@dav11d thanks for the issue! Can you share what errors you're seeing from webpack? Or is it IE11 that's throwing errors?
It might be related to this, which it appears I have yet to integrate into this library. I'll get that updated today and maybe that will fix it for you!
Edit: looks like I did, but hadn't pushed up those commits to Github. If you're able to share your errors I'm sure we can get it fixed together!
@estrattonbailey thanks for getting back to us on this.
IE11 is throwing SCRIPT1002: Syntax error in the console due to line 28 in matchit.mjs
let i=0, tmp, fn=(o,x) => isMatch(segs[x], o);
which contains ES6 / arrow functions, I assume we need a es5 version of matchit bundled together to make things work. (currently using slater / spaghetti )
@dav11d gotcha, yeah that's unfortunate. Maybe in the future we can updatematchit
to provide an ES5 export as well.
For now, I recompiled and included all external modules in a single bundle. Before I publish to latest, would you mind installing from npm i operator@dev --save
to see if that works? If it does, I'll push up a patch that removes the dev
tag so that it'll be install-able as per usual.
@estrattonbailey unfortunately threw a syntax error in operator.es.js, appears there is a couple functions still using es6 (minified line 1, column 1317) being first occurrence/syntax err
@dav11d ah shoot, I'm sorry. I see now that that actually didn't compile.
My understanding is that I can require
matchit in operator and it will resolve the commonjs file it ships with. This issue corroborates that I believe.
Think that could work? I pushed up another release under the dev
tag, should be 1.3.1
.
I can have a look at testing this in IE11 later as well, been out and about today. Thanks for your help!
@dav11d just pushed up 1.3.2 as latest
on npm, so you can npm i operator@latest --save
to get that. I ended up opening a PR to matchit and temporarily compiling operator from my fork, which I believe should solve your issue.
In testing I did realize (remembered, really) that IE11 also doesn't support Object.assign
, so I'd recommend just wacking a simple polyfill in for that.
Let me know if that fixes it for you! Again, really appreciate your help on this :)
Make that 1.3.3
now that that PR is merged 🎉
@estrattonbailey now we're talking! 🎉 It's working fine now, thanks a lot for your efforts.
@dav11d awesome! Happy to have it solved :)
Great library, we would love to use it in production however seems IE11 support is not ideal.
Running into bundling / module issue with matchit / webpack?
Could you suggest anyway around this?
Thanks