Skip to content
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

自定义主题编译失败 #40

Closed
chenghaohao opened this issue Oct 18, 2017 · 5 comments
Closed

自定义主题编译失败 #40

chenghaohao opened this issue Oct 18, 2017 · 5 comments

Comments

@chenghaohao
Copy link

  • antd-mobile 版本:1.x
  • 浏览器 (或标明是 react-native) 及其版本: chrome 61.0.3
  • 操作系统及其版本:windows 10

想请问下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)

@silentcloud
Copy link
Contributor

node_modules\antd-mobile\lib\style\themes\default.js

看着像是你 webpack extension 没配对

@chenghaohao
Copy link
Author

extensions: ['.web.js', '.js', '.json', '.web.jsx', '.jsx'],

exclude: [/.js$/, /.html$/, /.json$/, /.less$/, /.svg$/],

然后我把1.X分支上面的demo代码拉下来运行create-react-app的demo也是报这个错呢。。

@silentcloud
Copy link
Contributor

ok 我 check 一下

silentcloud added a commit that referenced this issue Oct 24, 2017
@silentcloud
Copy link
Contributor

我测试了没问题哈,主要也就是这行代码 https://github.com/ant-design/antd-mobile-samples/blob/1.x/create-react-app/config/webpack.config.dev.js#L244

@chenghaohao

@chenghaohao
Copy link
Author

好的,谢谢了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants