umijs / dumi

📖 Static Site Generator for component library development
https://d.umijs.org
MIT License
3.44k stars 1.17k forks source link

bug: 通过 `resolve.atomDirs` 指定多个资产路径时,Demo 无法正常显示。 #2016

Open NickeyLin opened 4 months ago

NickeyLin commented 4 months ago

Version

2.2.16

OS Version

13.6.1

Node.js Version

v20.10.0

Browser Version

Chrome 120.0.6099.216

Link to minimal reproduction

https://github.com/NickeyLin/minimal-dumi-reproduce.git

Steps to reproduce

  1. 创建dumi 2.x项目
  2. 添加移动端主题:pnpm add dumi-theme-mobile -D
  3. src目录下创建components, components-pro文件夹,并分别创建组件Foo,ProFoo,编写demo
  4. 添加配置 resolve.atomDirs: [{ type: 'component', dir: 'src/components' },{ type: 'component', dir: 'src/components-pro' },]
  5. 运行项目

What is expected?

正常显示文档及demo

What is actually happening?

ProFoo组件的demo显示404错误.

image

demo 的 iframe 地址好像是错误的:

image

Any additional comments? (optional)

No response

zhumenglonge commented 1 week ago

我也遇到了页面未找到的问题,解决了吗