Skip to content

Instantly share code, notes, and snippets.

@jordwalke
Created July 7, 2013 18:59
Show Gist options
  • Save jordwalke/5944524 to your computer and use it in GitHub Desktop.
Save jordwalke/5944524 to your computer and use it in GitHub Desktop.
How to require JSX files in node.js (uses deprecated node.js feature)
require.extensions['.jsx'] = function(module) {
module._compile(reactTools.transform(fs.readFileSync(module.filename, 'utf8')), module.filename);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment