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

roadhogrc.mock最佳实践 #167

Closed
102010cncger opened this issue Mar 10, 2017 · 8 comments
Closed

roadhogrc.mock最佳实践 #167

102010cncger opened this issue Mar 10, 2017 · 8 comments

Comments

@102010cncger
Copy link

在做一个有30多个页面的demo,模拟数据比较多,能否给一个多文件mock数据的roadhogrc.mock的最佳实践,谢谢了!

另外内容单独放在roadhogrc.mock.js中是有效的,一旦通过类似require('./mock/users')的方式引用后就没有效果了.是不是不是这么用的,谢谢!

@xiandongw
Copy link

遇到同样问题 mock只能放在roadhogrc.mock.js.

102010cncger referenced this issue in zuiidea/antd-admin Mar 11, 2017
@sorrycc
Copy link
Owner

sorrycc commented Mar 13, 2017

roadhogrc.mock.js 不能 require 其他文件吗?

@xiandongw
Copy link

没有sample可以follow。 照着dva的sample(antd-admin 不是用roadhog)看起来不行

@forever4313
Copy link

forever4313 commented Mar 13, 2017

同样的需求,看了下相关的内容,发现所有代理都配置在了mock.js里???可能是我太菜
有没有人帮忙写一个demo之类的,新手,想从dva原先使用的mockjs 转到现在roadhog来,原先的报错信息实在是不忍直视。

@305758409
Copy link

@xiandongw antd-admin的4.1dev分支已经在用roadhog了,可以参考,不过好像roadhog@0.6.0-beta.3还是没有解决这个问题 #86 ,持续关注

@zuiidea
Copy link

zuiidea commented May 5, 2017

@sorrycc
Copy link
Owner

sorrycc commented May 23, 2017

@sorrycc sorrycc closed this as completed May 23, 2017
@atonesapple
Copy link

roadhogrc.mock.js文件主要是用来做什么的,有大神解释一下么,谢谢!!!

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

7 participants