Skip to content
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

bug: When customizing the resolve.docDirs directory, .md files under the node_modules file are not ignored in Monorepo project #2010

Open
peterczg opened this issue Jan 13, 2024 · 2 comments

Comments

@peterczg
Copy link

Version

2.2.16

OS Version

macOS Sonoma

Node.js Version

16.16.0

Browser Version

Chrome 120.0.6099.129

Link to minimal reproduction

https://github.com/umijs/dumi/tree/master/examples/normal

Steps to reproduce

  1. Monorepo project with Dumi2.0
  2. Set .dumirc resolve.docDirs to ['docs', 'packages']
  3. Install Deps in workspace
  4. MD files under node_modules will be resolved

What is expected?

MD files under node_modules should be ignored.

What is actually happening?

Markdown files under the node_modules should have been ignored.

Any additional comments? (optional)

When I dig into the dumi2 source code, I found that exclude pattern is a hard-coded config which cannot be customized.

Please add an additional configuration item to allow users to ignore specific files; not only node_modules dir, but also some changelog.md in project etc.

@peterczg
Copy link
Author

peterczg commented Mar 7, 2024

用英文提的issue竟然没人处理,我笑了

@PeachScript
Copy link
Member

最近精力有限,所以很多 issue 都没来得及处理;把 packages 作为识别起始路径不是设计之内的场景,目前还没有 monorepo 的最佳实践,但设想的场景里子包的文档应当都是原子资产目录而非把所有子包从 packages 开始解析成路由,比如升级指南里的示例:https://d.umijs.org/guide/upgrading#%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84%E5%8D%87%E7%BA%A7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants