问题
I am trying to convert a React.js script using the JSX syntax into a script in plain js syntax I used react-tool like recommanded in http://facebook.github.io/react/docs/tooling-integration.html#jsx
But the output file simply doesnt work : no error in the browser console, nothing
The script (with the JSX syntax) can be found at : http://www.youni.education/javascripts/postslist.js
And you can see it working just fine at: http://www.youni.education/universities/University_of_Warwick
回答1:
Two things:
- If the extension of your file is jsx use
--extension jsx
- I've read that the
jsx
tool fails silently if you give it the wrong src and dest dirs
来源:https://stackoverflow.com/questions/27887291/react-tools-jsx-compile-a-not-generating-js-script