-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[RFC] Warn user if have react-router or react-router-dom in package.json #2120
Comments
使用 umi-plugin-react 开启 locale ,再额外引入不同版本的 umi-plugin-locale 也会出现同类问题,两个不同版本的依赖创建了两个闭包,import 到的内容不一致,可以考虑用 umi 的 alias 配置屏蔽掉部分用户额外引入的依赖 |
路由这一块还是放在umi统一管理,没什么好选择的。一些组件和工具类包,可以允许用户自定义版本 |
+1 react-router 和 react-router-dom 感觉没有什么理由要支持用户自定义,我理解路由这块 react-router 都应该是对用户不可见的。 @imhele 说的问题应该就可以用类似 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
已锁定。 |
背景
参考 sorrycc/blog#82,由于 umi 现在允许用户自定义 react-router-dom 等库的版本,所以可能会出现不一致。比如 react-router 和 react-router-dom 版本不一致时会出现问题。
思路
几个方案:
有点倾向方案 2 。
跟进
The text was updated successfully, but these errors were encountered: