Comments (4)
清空缓存,重装依赖试下呢。
rm -rf node_modules && rm -rf src/.umi && pnpm install
from umi.
其实这个步骤我已经做过了 还是你不行
from umi.
其实这个步骤我已经做过了 还是你不行
抱歉,useModel
useIntl
是 @umi/max
内置的能力。如果使用了 @umijs/max
可以使用 max
命令来替换 umi
。
详细可参考:https://umijs.org/docs/introduce/upgrade-to-umi-4
from umi.
umi 4 分为 umi
和 max (@umijs/max
) ,前者不内置任何插件,如果需要 model / dva 等功能要自己添加这些插件,后者内置了一堆插件,方便直接开启使用。
普通 umi 项目要使用某个功能,只要安装 @umijs/plugins
然后配一下就行了,参考:使用插件
你这里需要配一下 plugins: ['@umijs/plugins/dist/model']
和 model: {}
,如果还用到了其他功能,需要一起都配置打开,或者就使用 max ,省去安装 @umijs/plugins
和配置 plugins: [...]
from umi.
Related Issues (20)
- [Feature] 优先使用用户安装的 `babel-plugin-react-compiler` HOT 1
- [Task] PR #12398 代码修复 HOT 1
- [Feature Request] 支持 qiankun 多实例的保活 HOT 3
- umi 官方文档 ->blog(博客)->Umi 4 RC ->《比 Vite 更快的 MFSU》 文档出现问题 HOT 1
- 使用umimax时,使用了装饰器的代码无法被esbuild编译 HOT 2
- [Bug] umi3升级umi4遇到的微前端问题 HOT 1
- umi项目开启了MFSU后,如果浏览的页面打开了控制台热更新很慢,当我关闭控制台后它特别快 HOT 1
- 滚动条
- [Bug] umi4启动时的动画 HOT 1
- chainWebpack 配置devServer.set('contentBase', './public-demo');无效 HOT 1
- [Feature Request] chainWebpack 配置devServer.set 无效
- [Bug] umijs/max max dev 报错 TypeError: The 'compilation' argument must be an instance of Compilation HOT 1
- 期望能保持umi3的特性,使用自定义的parentId, id HOT 1
- umi 添加国际化后 本地正常 线上报错 页面空白"umi": "^3.4.8",
- Request调用POST请求的时候异常`Cannot convert object to primitive value` HOT 1
- umi3升级umi4后,项目启动报错:ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION is not defined HOT 1
- umi3升级冘 HOT 1
- umi3升级umi4后,项目启动报错:ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION is not defined
- [Bug] 关于umi3.5x 开启webpack5后 static文件中图片丢失问题 求助!
- [Feature Request] dev模式请求 流式接口http chunk,能否支持流式chunk,当前是将所有的chunk包都放到最后一帧返回的 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umi.