string.ify icon indicating copy to clipboard operation
string.ify copied to clipboard

`const` in output build, breaking older browsers

Open aksperiod opened this issue 4 years ago • 3 comments

Hi @xpl! I love this library and ololog, however I just found out that this library, string.bullet and printable-characters pollute my webpack bundle with unwanted const, breaking IE11. I'm assuming this is a configuration error in the build process. Thanks!

aksperiod avatar Jun 04 '20 03:06 aksperiod

Yeah, looks-like it is not IE11-ready. I'll try to tune the build scripts on the weekend.

But in the meantime you could try to relax your webpack config where you exclude node_modules/ from getting processed by Babel. Maybe if you specifically include node_modules/string.ify it will get processed...

xpl avatar Jun 04 '20 23:06 xpl

Thanks! I'm so happy I don't have to take ololog out of my projects.

aksperiod avatar Jun 04 '20 23:06 aksperiod

@aksperiod Could you please check if replacing const with var solves the problem (just replace it with search-and-replace right in the bundle)? Because it could be more than just const, for example some missing built-in methods that could require polyfilling. I don't have an IE11 at hand to check.

If it's only const then it's going to be an easy fix, I'll then add the required transform.

P.S. I remember that I intentionally hand-picked the Babel transforms to reduce the bundle size of all those libraries I maintain, because transpiling to ES5 brought to much clutter (polyfills and stuff) not needed in post-IE world.

xpl avatar Jun 06 '20 14:06 xpl