Modularized antd-mobile doesn't work in my project(nextjs9.1.6 with typescript) #13474
-
this is my .babelrc file
it doesn't work, and the project still warn ' You are using a whole package of antd-mobile' I think maybe I can resolve this problem if I use the ts-import-plugin, but nextjs @9 is zero typscript config, I can't find where to use it, here's some ts-import-plugin api:
and what can I do next? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Finally I find the answer, it's not about nextjs. I find some code in this project, here it is :
now babel-plugin-import can translate import xxx from 'antd-mobile' to var xxx = require('antd-mobile/lib/xxx'),bu meet the first word 'export', it will not work. |
Beta Was this translation helpful? Give feedback.
Finally I find the answer, it's not about nextjs.
I find some code in this project, here it is :
now babel-plugin-import can translate import xxx from 'antd-mobile' to var xxx = require('antd-mobile/lib/xxx'),bu meet the first word 'export', it will not work.
so although I had wrote the Modularized antd-mobile setting in my .babelrc file, the whole package warning still exist.