Closed chenghaohao closed 7 years ago
node_modules\antd-mobile\lib\style\themes\default.js
看着像是你 webpack extension 没配对
extensions: ['.web.js', '.js', '.json', '.web.jsx', '.jsx'],
exclude: [/.js$/, /.html$/, /.json$/, /.less$/, /.svg$/],
然后我把1.X分支上面的demo代码拉下来运行create-react-app的demo也是报这个错呢。。
ok 我 check 一下
我测试了没问题哈,主要也就是这行代码 https://github.com/ant-design/antd-mobile-samples/blob/1.x/create-react-app/config/webpack.config.dev.js#L244
@chenghaohao
好的,谢谢了
想请问下1.X的分支下的create-react-app demo是不能用了吗?是run eject之后的配置法。加入自定义主题会编译失败,试了多次都不行。 报错: Failed to compile.
./node_modules/antd-mobile/lib/icon/style/index.less Module build failed:
'use strict'; ^ Unrecognised input in E:\react\antd-mobile-samples\create-react-app\node_modules\antd-mobile\lib\style\themes\default.js (line 1, column 0)