-
Notifications
You must be signed in to change notification settings - Fork 103
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
👑 [需求] 能排除掉 reactflow 的依赖吗? #312
Comments
排除依赖指的是希望 node_modules 下不存在这个包吗?具体问题场景是什么,与项目中显式安装的 reactflow 版本冲突么?似乎是包管理的问题,而不是 prochat 的问题,需要提供更多细节 |
@AmAzing129 是的,当项目安装 pro-chat 时,会在 node_modules 下安装有低版本的 reactflow,而目前最新的 reactflow 已经换成了 “@xyflow/react”, 这两个库的 api,类名是完全一样的。 所以希望 pro-chat 能以移除掉旧的 reactflow(所谓的移除是希望安装 pro-chat 的时候, node-modules 下不要带有 reactflow 了),或者也可以 reactflow 升级到最新版本的 “@xyflow/react” |
"overrides": {
"reactflow": "npm:@xyflow/[email protected]"
}
但实际上,The package reactflow has been renamed to @xyflow/react and it's not a default import anymore. 导入方式产生了变化。 所以开发态取决于你的构建工具,比如 vite 直接跑会报错,next.js 试了一下正常运行。需要自行处理了。 部署时有 treeshaking 不影响。 |
🥰 需求描述
项目中有用到最新版本的 reactflow,而 pro-chat 中也通过 pro-editor 依赖了这个,但是在实际应用中, pro-chat 没有场景使用到 reactflow。 能否排除掉这个依赖?
The text was updated successfully, but these errors were encountered: