jsx-loader icon indicating copy to clipboard operation
jsx-loader copied to clipboard

ES6 modules support

Open prayerslayer opened this issue 10 years ago • 9 comments

Fixes #45.

prayerslayer avatar Mar 13 '15 15:03 prayerslayer

Please accept this pull request so we don't have to use forks.. @petehunt Are you still using the jsx-loader at Instagram and Facebook? If not, what are you using instead?

theasta avatar Mar 17 '15 20:03 theasta

I found out that babel-loader works fine.

prayerslayer avatar Mar 17 '15 20:03 prayerslayer

@prayerslayer Sure but babel-loader is slow and shouldn't be used on too many files (just quoting the docs). Are you working on a big codebase with it?

theasta avatar Mar 17 '15 20:03 theasta

No, just starting. Would you mind posting a link to said docs? 

-----Original Message----- From: Alexandrine Boissière [email protected] Reply: petehunt/jsx-loader [email protected]> Date: 17 Mar 2015 at 21:54:29 To: petehunt/jsx-loader [email protected]> Cc: Nikolaus Piccolotto [email protected]> Subject:  Re: [jsx-loader] ES6 modules support (#46)

@prayerslayer Sure but babel-loader is slow and shouldn't be used on too many files (just
quoting the docs). Are you working on a big codebase with it?


Reply to this email directly or view it on GitHub: https://github.com/petehunt/jsx-loader/pull/46#issuecomment-82596475

prayerslayer avatar Mar 17 '15 21:03 prayerslayer

It is actually in the readme file: https://github.com/babel/babel-loader#babel-loader-is-slow

theasta avatar Mar 17 '15 21:03 theasta

Sorry I have to nitpick here, but it doesn't say that it's slow and you shouldn't use it on a large codebase. It says if you're experiencing a slow babel-loader, then make sure you're not doing unnecessary transformation. Which sounds reasonable.

But I don't want to imply that you are wrong! Have you tried babel on your code? What scale of "slow" are we talking about?

Edit: On a second read I get that the babel-loader docs are not really clear on this part. One could understand it both ways. But since it's listed under "troubleshooting" I didn't get the impression that "babel is slow" is meant as a warning. :)

prayerslayer avatar Mar 17 '15 22:03 prayerslayer

You're completely right. However when we tested both tools, jsx was faster than Babel.

theasta avatar Mar 18 '15 00:03 theasta

Would it be possible to get this patch merged? Thanks.

dhbaird avatar Jul 01 '15 10:07 dhbaird

:+1: to just using the babel-loader. It works great for me.

micahlmartin avatar Aug 03 '15 12:08 micahlmartin