Does the ecmascript package support JSX?

Or should the jsx package be used instead? Thought I’d ask since both use Babel, and Babel which supports JSX by default.

Haven’t tried yet but I believe yes, you can just use the ecmascript package and put all your es6 and/or react code into .jsx files.

@newswim I checked the ecmascript package source, and it looks like it only handles .js files, but the options provided to Babel don’t specifically blacklist JSX or whitelist it, and since react is supported by default unless blacklisted, it might just work.

They don’t want the ecmascript package to enable JSX because they want to enable some optimizations specific to the language. It is why their is a wonderful jsx package :slight_smile:

@benjamn So what do we do if we want both JSX and import/export syntax? Do we use ecmascript or jsx? Related issue on GitHub