我正在尝试使用 react-tools npm 包中的 jsx 转换器,但是当我尝试将 jsx 代码转换为常规 js 时,它似乎什么也没做。
这是我尝试转换文件时得到的:
C:\Git\sendcoin\public\node_modules\.bin>jsx -w c:\Git\sendcoin\public\scripts\components c:\Git\sendcoin\public\production\scripts\arg
built Module("about/AboutView")
built Module("Page")
built Module("account/AccountWalletPoliciesTable")
built Module("general/LoggedInNavBar")
built Module("general/NotLoggedInNavBar")
built Module("general/NotLoggedInView")
built Module("modals/ChangePasswordModal")
built Module("account/AccountTransactionsView")
built Module("general/LoggedInView")
built Module("modals/PhoneVerificationModal")
built Module("sign-up/SignUpHeader")
built Module("modals/TransactionGAAuthenticationModal")
built Module("settings/PreferencesView")
built Module("settings/UserProfileView")
built Module("general/SiteNavigationBar")
built Module("settings/SettingsView")
built Module("sign-in/SignInView")
built Module("sign-in/SignInHeader")
built Module("account/AccountWalletPoliciesView")
built Module("modals/EditWalletModal")
built Module("modals/utils/AuthenticationModal")
built Module("sign-in/SignInPrompt")
built Module("contact/ContactView")
built Module("sign-in/SignInPromptFooter")
built Module("account/AccountWalletsView")
built Module("modals/NewPolicyModal")
built Module("modals/TransactionAuthyAuthenticationModal")
built Module("modals/ConfirmationModal")
built Module("settings/AuthenticationView")
built Module("sign-up/SignUpPrompt")
built Module("modals/utils/PolicyParamInputs")
built Module("modals/utils/ModalHeader")
built Module("modals/NewWalletModal")
built Module("account/AccountView")
built Module("utils/DataTable")
built Module("utils/TabbedView")
built Module("utils/ValidatedForm")
built Module("utils/Modal")
built Module("utils/ValidatedInput")
built Module("utils/ViewPager")
built Module("utils/Validators")
built Module("support/SupportView")
built Module("utils/AmountInput")
built Module("utils/ButtonAlert")
built Module("sign-up/SignUpView")
built Module("utils/CurrencyInput")
built Module("utils/ViewSwitchBar")
built Module("modals/TransactionSMSAuthenticationModal")
["Page","about/AboutView","account/AccountTransactionsView","account/AccountView","account/AccountWalletPoliciesTable","account/AccountWalletPoliciesView","account/AccountWalletsView","contact/Contact
View","general/LoggedInNavBar","general/LoggedInView","general/NotLoggedInNavBar","general/NotLoggedInView","general/SiteNavigationBar","modals/ChangePasswordModal","modals/ConfirmationModal","modals/
EditWalletModal","modals/NewPolicyModal","modals/NewWalletModal","modals/PhoneVerificationModal","modals/TransactionAuthyAuthenticationModal","modals/TransactionGAAuthenticationModal","modals/Transact
ionSMSAuthenticationModal","modals/utils/AuthenticationModal","modals/utils/ModalHeader","modals/utils/PolicyParamInputs","settings/AuthenticationView","settings/PreferencesView","settings/SettingsVie
w","settings/UserProfileView","sign-in/SignInHeader","sign-in/SignInPrompt","sign-in/SignInPromptFooter","sign-in/SignInView","sign-up/SignUpHeader","sign-up/SignUpPrompt","sign-up/SignUpView","suppor
t/SupportView","utils/AmountInput","utils/ButtonAlert","utils/CurrencyInput","utils/DataTable","utils/Modal","utils/TabbedView","utils/ValidatedForm","utils/ValidatedInput","utils/Validators","utils/V
iewPager","utils/ViewSwitchBar"]
问题是我在输出文件夹中得到的字段仍然是 jsx,这意味着 html 标签没有被翻译成函数。有任何想法吗?