Skip to content
This repository has been archived by the owner on Dec 31, 2018. It is now read-only.

Resolving JSX #396

Open
tomitrescak opened this issue Aug 27, 2016 · 3 comments
Open

Resolving JSX #396

tomitrescak opened this issue Aug 27, 2016 · 3 comments

Comments

@tomitrescak
Copy link

Hi. I really like the project, and pundler is simply amazing!

I have a bit of issue though, I'm using typescript which transpiles React files to JSX not JS. How can I make the app recognise JSX extension?

Thanks

@natew
Copy link
Contributor

natew commented Aug 27, 2016

Are you importing it locally or from a module? Does typescript not support compiling to *js?

@steelbrain
Copy link
Owner

@tomitrescak You don't really have to use the jsx extension as @natew hinted. You can just use the normal .js extension and rest assured it'll not break anything or lead to any unexpected behaviors.

We could of course add support for configuring pundle's supported require extensions but don't really have a solid use case for it (yet?)

@tomitrescak
Copy link
Author

Guys, unfortunately typescript outputs TSX only to JSX, there is no way to change that. The only possibility is to output TSX code to react (React.createClass) that is much harder to debug.

So, the workflow is to output TSX code to pure ES6 with original markup for easier debug. Having JSX wil make a lot of Angular people happy as well as other TS enthusiasts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants