fangzhengjin / umi-plugin-panel-tabs

umi-plugin-panel-tabs
MIT License
87 stars 20 forks source link

@umijs/plugin-access 加载失败 #20

Closed bluef1ash closed 2 years ago

bluef1ash commented 2 years ago

与 #2 相同的问题,我用的是ant design pro V5,如果增加 @umijs/plugin-access 依赖会报错

plugin @umijs/plugin-access is already registered by /node_modules/@umijs/plugin-access/lib/index.js, plugin from
/node_modules/@umijs/plugin-access/lib/index.js register failed.

如果不增加依赖,就会报 #2

fangzhengjin commented 2 years ago

给个复现仓库

bluef1ash commented 2 years ago

给个复现仓库

https://github.com/bluef1ash/phone-number-manager/tree/feature-tabs/frontend

fangzhengjin commented 2 years ago

给个复现仓库

https://github.com/bluef1ash/phone-number-manager/tree/feature-tabs/frontend

这是一个umijs的锅, 你用的umijs版本太新了, 详见这里: https://github.com/umijs/plugins/issues/779

解决方法, 将package.json里的@umijs/plugin-access移除, 在config.ts中增加access: {}配置项

bluef1ash commented 2 years ago

给个复现仓库

https://github.com/bluef1ash/phone-number-manager/tree/feature-tabs/frontend

这是一个umijs的锅, 你用的umijs版本太新了, 详见这里: umijs/plugins#779

解决方法, 将package.json里的@umijs/plugin-access移除, 在config.ts中增加access: {}配置项

增加 access: {} 后,约定式 src/access.ts 失效,有什么解决方案吗?