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

你好 我做同构的时候出问题了 #6

Closed
18613109040 opened this issue May 2, 2017 · 3 comments
Closed

你好 我做同构的时候出问题了 #6

18613109040 opened this issue May 2, 2017 · 3 comments

Comments

@18613109040
Copy link

同构的时候出现下面问题,请问如果是同构需要怎么做

ERROR in ./client/App.js
Module not found: Error: Cannot resolve module 'antd-mobile/lib/button/style/css
' in C:\DouBo.New.Web\client
@ ./client/App.js 7:11-54

ERROR in .//._antd-mobile@1.1.1@antd-mobile/lib/button/index.js
Module not found: Error: Cannot resolve module 'react-native' in C:\DouBo.New.We
b\node_modules._antd-mobile@1.1.1@antd-mobile\lib\button
@ ./
/._antd-mobile@1.1.1@antd-mobile/lib/button/index.js 12:17-40

ERROR in .//._antd-mobile@1.1.1@antd-mobile/lib/button/style/index.js
Module not found: Error: Cannot resolve module 'react-native' in C:\DouBo.New.We
b\node_modules._antd-mobile@1.1.1@antd-mobile\lib\button\style
@ ./
/._antd-mobile@1.1.1@antd-mobile/lib/button/style/index.js 2:17-40
Child html-webpack-plugin for "..\views\dev\index.html":
Asset Size Chunks Chunk Names
../views/dev/index.html 26.2 kB 0
chunk {0} ../views/dev/index.html 1.9 kB [rendered]
[0] ./~/._html-webpack-plugin@2.28.0@html-webpack-plugin/lib/loader.js!.
/views/tpl/index.tpl.html 1.9 kB {0} [built]
<-- GET /__webpack_hmr
webpack building...

@paranoidjk
Copy link
Contributor

看起来你是少了 css 相关的loader.

参考下这个服务端渲染的demo吧 https://github.com/ant-design/antd-mobile-samples/tree/master/web-next

@ghost
Copy link

ghost commented Jul 7, 2017

demo 现在是404?

@paranoidjk
Copy link
Contributor

@andy1028 sorry,改文件夹名了: https://github.com/ant-design/antd-mobile-samples/tree/master/web-ssr

但所有官方demo都在这个仓库,可以直接在里面找

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