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
umi-lib,部分依赖放在dependencies中导致打包umd时报错 #2126
Comments
peerDependencies是这样约定的没错,但是很多组件需要放到dependencies中进行打包,我的项目中就存在好几个第三方组件放到dependencies中打包不成功的问题 |
rollup中有解决方案https://rollupjs.org/guide/en#error-name-is-not-exported-by-module- 这种该如何解决? |
可能和 #2130 有关。 |
更新了1.2.2,依然是同样的问题。 |
给可复现步骤。 |
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. |
使用umi-lib打包组件时,某些情况下依赖如果放在dependencies中,会导致打包umd时报错,
比如下图,如果把react放在peerDependencies中就能正常打包。
但是peerDependencies中的依赖不会被打包到输出文件中,那么下述情况就会依赖外部的react,必须在html中另行引入react的umd文件。
Context
The text was updated successfully, but these errors were encountered: