-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
umi build后,报model组件undefined #1378
Comments
请提供可复现仓库。 |
https://github.com/xwy55555/face_cms.git git clone https://github.com/xwy55555/face_cms.git
yarn install
yarn start ======正常 yarn build
yarn global add serve
serve ./dist ======报错 |
应该是交差使用model的问题 |
即使删得只剩登录模块,也会报同样的问题,所以不是交差使用model的问题 |
@sorrycc 麻烦抽空看一下 |
把动态加载关掉(.umirc.js --》dynamicImport: false)就ok了,所以应该是umi架构在处理动态加载时有bug,我猜呀 |
我试了下是这个报错,就是 @xiaohuoni 所说的问题,在 /index 下依赖了 userLogin 的 model。 |
还有一些其他问题,
|
确实存在这种情况,交叉使用在dev模式下可以正常使用,在build后就会出现undefined |
你好,我想请教一下,如果要交叉使用的话,有什么解决方法吗 |
同样出现这个问题~有人解决了吗? |
#1483 提到对dynamicImport的设置,不设置这个值就解决了build出来的问题 |
@zouliang073 应该是个bug,不知道修复了没,我当时是的做法是放弃交叉使用。 |
就是这么设计的,真的要交叉使用,全部使用全局model就好了 |
dev可以,但是build不行,不符合设计规范呀 |
就是这么设计的 |
开发可以,是因为开发便捷 |
基于umi2.2.1构建的管理系统,约定式路由,umi dev时一切正常
umi build后,报model组件undefined
参考了umi所有的示例,也没搞清楚问题出在哪
请各位大神指导一下
The text was updated successfully, but these errors were encountered: