Skip to content

Conversation

@ycjcl868
Copy link
Contributor

@ycjcl868 ycjcl868 commented Jan 26, 2021

@feibi
Copy link

feibi commented Mar 3, 2021

这个可以合并过去了吗

@codecov
Copy link

codecov bot commented Apr 1, 2021

Codecov Report

Merging #523 (028ac6d) into master (7212b8b) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #523      +/-   ##
==========================================
+ Coverage   47.63%   47.73%   +0.10%     
==========================================
  Files          66       66              
  Lines        1541     1544       +3     
  Branches      424      427       +3     
==========================================
+ Hits          734      737       +3     
  Misses        806      806              
  Partials        1        1              
Impacted Files Coverage Δ
packages/plugin-dva/src/index.ts 69.89% <100.00%> (+1.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7212b8b...028ac6d. Read the comment docs.

@ycjcl868 ycjcl868 requested review from sorrycc and xiaohuoni April 1, 2021 07:40
@xiaohuoni
Copy link
Member

不过没看明白,这个和关联的issues有什么关系,dva 的文件 load 和 umi 的导出有什么关系嘛?

@ycjcl868
Copy link
Contributor Author

ycjcl868 commented Apr 2, 2021

不过没看明白,这个和关联的issues有什么关系,dva 的文件 load 和 umi 的导出有什么关系嘛?

有,循环依赖

@ycjcl868
Copy link
Contributor Author

ycjcl868 commented Apr 9, 2021

ping @sorrycc

@sorrycc
Copy link
Member

sorrycc commented Apr 9, 2021

umi 的文档同步更新下。

@ycjcl868 ycjcl868 merged commit 1d8fb78 into master Apr 9, 2021
@delete-merged-branch delete-merged-branch bot deleted the fix-dva-model-import branch April 9, 2021 08:40
@jackchoumine
Copy link

umi 的文档同步更新下。

请问这个问题如何解决的呢? 看了官网和github,还是没有找到解决方案。
官网说的配置是 .umi.ts 吗? 这样,dva:

{
  nodeModulesTransform: {
    type: 'none',
  },
  dva: {
    disableModelsReExport: true,
    lazyLoad: true,
  },
  // layout: {},
  routes: [
    { path: '/', component: '@/pages/index' },
    { path: '/users', component: '@/pages/users' }, // , wrappers: ['@/auth.js']
  ],
  fastRefresh: {},
}

这样配置了,还是不行。

@GuanJianSayWeee
Copy link

umi 的文档同步更新下。

请问这个问题如何解决的呢? 看了官网和github,还是没有找到解决方案。
官网说的配置是 .umi.ts 吗? 这样,dva:

{
  nodeModulesTransform: {
    type: 'none',
  },
  dva: {
    disableModelsReExport: true,
    lazyLoad: true,
  },
  // layout: {},
  routes: [
    { path: '/', component: '@/pages/index' },
    { path: '/users', component: '@/pages/users' }, // , wrappers: ['@/auth.js']
  ],
  fastRefresh: {},
}

这样配置了,还是不行。

+1 按文档上写的dva: {
disableModelsReExport: true,
lazyLoad: true,
},
确实不行

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

Successfully merging this pull request may close these issues.

umi3.2在dva的model中直接或间接使用isBrowser()报错TypeError: Object(...) is not a function

7 participants