dumi
dumi copied to clipboard
CodeSandbox中没有自身依赖
Question
在点击CodeSandbox之后,得到如下错误

发现根本没有引自己,手动在CodeSandbox添加了依赖之后就能正常显示了。 好奇这个package.json是如何编辑的。没有找到官方demo里有相关配置
https://mcdaddy.github.io/erda-ui-components/components/common/avatar
Sample Code
Hello @McDaddy. In order to facilitate location and troubleshooting, we need you to provide a realistic example. You can create a dumi project by clicking here and provide the GitHub warehouse address and reproduce examples.
你好 @McDaddy, 为了方便定位和排查问题,我们需要你提供一个重现实例。你可以通过点击 此处 创建一个 dumi 项目并提供 GitHub 仓库地址和重现实例。
https://github.com/McDaddy/erda-ui-components 重现地址上面已经贴了 @PeachScript
应该是自定义源码目录引起的,目前应该只有在 src 下能正常工作,有空可以一起看看怎么解,相关逻辑:
- 采集 demo dependencies:https://github.com/umijs/dumi/blob/master/packages/preset-dumi/src/transformer/demo/dependencies.ts#L124
- 只有
src/index存在时才在 node_modules 下创建当前组件库的软连接:https://github.com/umijs/dumi/blob/master/packages/preset-dumi/src/plugins/features/symlink.ts#L52
Hello @McDaddy. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
你好 @McDaddy,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。
ProComponents也有同样的问题
应该是自定义源码目录引起的,目前应该只有在
src下能正常工作,有空可以一起看看怎么解,相关逻辑:
- 采集 demo dependencies:https://github.com/umijs/dumi/blob/master/packages/preset-dumi/src/transformer/demo/dependencies.ts#L124
- 只有
src/index存在时才在 node_modules 下创建当前组件库的软连接:https://github.com/umijs/dumi/blob/master/packages/preset-dumi/src/plugins/features/symlink.ts#L52
这种方案是不是不支持pnpm?
不知道是不是和执行顺序有关,dependencies执行完了才执行symlink插件??这怕是不对劲吧