acornjs / acorn-jsx

Alternative, faster React.js JSX parser
MIT License
648 stars 72 forks source link

Issues in IE11 with untranspiled export #98

Closed Scoutski closed 5 years ago

Scoutski commented 5 years ago

Hi, I just wanted to ask whether or not it would be possible to fully transpile the acorn-jsx export to IE friendly ES5 as it contains a class declaraction (line 72) return class extends Parser { that when included in an IE11 project, causes IE11 to fail? If you're happy for me to, I can create a PR to do this?

If you want, I can provide more info. Regardless, I appreciate your time and work, thanks.

RReverser commented 5 years ago

Yes, it should be possible, just configure your transpiler to include Acorn-JSX.

dmt0 commented 4 years ago

I'm using webpack-babel-env-deps to determine which packages to transpile to ES5. acorn-jsx escapes it (and had to be added manually), since there's no engines field in package.json. Would be great if things would "just work". 🙂