-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES6 transformation not working #26
Comments
This doesn't work for me either: // app.js
require('node-jsx').install({ extension: '.jsx', harmony: true });
require('es6-component');
// es6-component.jsx
var ES6Component = React.createClass({
render() {
return (<div></div>);
}
}); Results in:
|
I believe you need to require a .jsx in another module: require('node-jsx').install({ extension: '.jsx', harmony: true });
require('./app');
// app.js
var test = require('./test.jsx');
test.testoutput(); does it work? |
Are you referring to @martintietz's example or mine? I've made mine a bit more clear. It should be possible this way, right? |
Both :) Now you |
I don't get it. I require/install node-jsx from the root level in which I include some jsx later on. See this branch of my example of how I did this. This should work, right? |
Both examples cited have syntax errors. See my gist for corrections. |
Ah, that makes sense. I'll try it out shortly, thanks! Can't wait for 0.13 to get out of beta though :) |
Writing it the way you've explained, |
FYI: Babel.js saved the day for me: https://github.com/Jpunt/fluxible-offline |
Using this example file
test.jsx
:Trying to require
test.jsx
from inside another file ...... gives me the following error:
The text was updated successfully, but these errors were encountered: