react-tool's JSX compile a not generating JS script

让人想犯罪 __ 提交于 2019-12-11 07:55:39

问题


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:

  1. If the extension of your file is jsx use --extension jsx
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!