-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
当前如何使用typescript? #531
Comments
我确认都看过了。去掉typescript是没问题的,应该说明该有的的都有了吧?只有使用typescript才有这种情况。 3开始才报错,尝试将 antd-mobile 换成 antd 也跑得通的。 |
更新到 antd-mobile 0.9 的最新版,另外麻烦给出更详细的错误日志 |
关联 #523 |
dva 生成的项目带有 typescript 配置,https://github.com/ant-tool/atool-build/blob/master/src/getWebpackCommonConfig.js#L63 这里有支持。参考这个能正常跑的示例 https://github.com/warmhug/__/blob/master/_react/dva-ts/package.json |
抱歉没有及时回复,我的问题出在自己配置了tsconfig,其中module选项应为es2015; |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
本地环境
dva+typescript
你做了什么?
tsx中引入antd-mobile
你期待的结果是:
正常使用
实际上的结果:
ERROR in ./src/routes/IndexPage.tsx
Module not found: Error: Cannot resolve module 'antd-mobile' in D:\cs\src\routes
@ ./src/routes/IndexPage.tsx 5:20-42
使用antd没有任何问题,去掉ts也能正常使用,antd-mobile+ts则出错
The text was updated successfully, but these errors were encountered: