-
Notifications
You must be signed in to change notification settings - Fork 49.9k
Closed
Description
Currently, bin/jsx defaults to looking for .js files to which contain jsx content to compile. Whilst it's possible to override this using jsx -x jsx ..., I think that since jsx content is not valid JavaScript, using the .js extension by default isn't ideal.
Could we change bin/jsx to look for .jsx files instead?
Another advantage to this is that the generated .js files can live the same directory as the source .jsx. This simplifies the generation of source maps files as well, because the path to the .jsx is trivially relative to the generated .js
For example, given foo.jsx, running jsx . . would result in:
$ ls
foo.jsx
foo.js
foo.js.map