petehunt / node-jsx

transparently require() jsx from within node
164 stars 32 forks source link

Make .jsx the default extension #18

Open hoppula opened 10 years ago

hoppula commented 10 years ago

I was debugging why my node.js app took several seconds to boot and finally found the culprit to be that having:

    require('node-jsx').install();

as first line of the app made all the subsequent require calls to go through React.transform. My app starts now almost immediately after changing my React components to use .jsx extension and memory usage is 1/3 of original :)

README could possibly warn about this or .jsx could be set as default extension to prevent similar cases.

Josh-a-e commented 9 years ago

bump - I think this is a good idea.