umi-next icon indicating copy to clipboard operation
umi-next copied to clipboard

acccess 组件开启式,默认需要开启 model 和 initialState 插件

Open stormslowly opened this issue 2 years ago • 1 comments

如果未开启,有如下报错

可以在适当时机,setUmirc 直接帮用户开启 or 提示用户手动开启

@PeachScript

error - ./.umi/plugin-access/runtime.tsx:10:0-37
Module not found: Error: Can't resolve '@/access' in '/Users/pshu/git/umi-playground/.umi/plugin-access'
error - ./.umi/plugin-access/runtime.tsx:11:0-43
Module not found: Error: Can't resolve '@@/plugin-model' in '/Users/pshu/git/umi-playground/.umi/plugin-access'
wait  - Compiling...
error - ./.umi/plugin-access/runtime.tsx:10:0-37
Module not found: Error: Can't resolve '@/access' in '/Users/pshu/git/umi-playground/.umi/plugin-access'
error - ./.umi/plugin-access/runtime.tsx:11:0-43
Module not found: Error: Can't resolve '@@/plugin-model' in '/Users/pshu/git/umi-playground/.umi/plugin-access'

stormslowly avatar Mar 24 '22 08:03 stormslowly

现在讨论的结果看 开启 access 需要 开启 model,创建 access 文件夹 同时还需要新建一个accessFactory 的文件

所以还是考虑通过 generator 创建。

插件本身也在合适时机 自检下 然后 warning 下用户

stormslowly avatar Mar 24 '22 09:03 stormslowly