react-jsx-parser
react-jsx-parser copied to clipboard
IE11 not working with es5 version
IE11 does not support arrow functions ()=>{}
(https://caniuse.com/arrow-functions), but seems like in https://github.com/TroyAlford/react-jsx-parser/blob/develop/dist/es5/react-jsx-parser.min.js there are some arrow functions, which leads to not working code in IE11.
Sorry guys :\ At this point, given that Microsoft no longer supports IE11, I have no intention of continuing to support IE11 for my open-source projects, like this one.
That said, I am open to a PR if someone else wants to take it on?
I understand your intention not to support IE11, but your library is used on a lot of large production sites that unfortunately have to support IE11 :)
Do you think the scope of the changes to support IE11 are limited to arrow functions, meaning transpilation is just needed?
That may be all it takes, yes. The library doesn't actually do anything particularly hairy, itself. The bulk of the lib's size, though, is based on importing/packaging acorn js, so the issue (if there is one) would be to transpile/package that sufficiently.
That said, I think it's important to offer 2 separate packages, because of the file-size difference.
- an es6/modern implementation, to be used by evergreen browsers
- an es5/transpiled implementation, to be used specifically for ie11
It may be as straightforward as simply setting babel's browserslist target to ie11 and getting the webpack/typescript to honor targeting es5, and splitting the output to the two above-described targets.
This is what I had set up prior, but it broke - and since MS no longer supports IE11, I am of the personal belief that we should push the web forward, as engineers, by letting the poor baby die instead of continuing to monkey-patch open-source projects and such to support it (which only encourages the industry, as a whole, to support 10-year-old broken software).
/rant off :) If you're interested in adding the support back in, I'm totally open to a PR for it, which is why I left this ticket open with the help-wanted label to begin with. :)