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

TypeDoc generates an insanely large 16GB output on a pnpm monorepo with lots of packages #2617

Closed
AlexAegis opened this issue Jun 25, 2024 · 1 comment
Labels
bug Functionality does not match expectation
Milestone

Comments

@AlexAegis
Copy link

Search terms

pnpm, monorepo, symlink

Expected Behavior

To produce a small output

Actual Behavior

The TypeDoc output is large, all inter-package dependencies are duplicated in the individual package output folders.

I don't remember this being a problem in earlier versions, I've been using "entryPointStrategy": "packages" for a while now. Also do note that while "node_modules/**" is not part of the "exclude" array, I did try it and made no difference.

image

The ncdu output might give a better idea, each dependency and their dependencies are present in every media folder. Each of these dependencies are part of this repository.

Steps to reproduce the bug

Given the nature of the problem I can only provide a large repo as example

npm i -g pnpm
git clone -b typedoc https://github.com/AlexAegis/js-tooling
pnpm i
pnpm typedoc_

Then check the size of .cache/typedoc

Environment

  • Typedoc version: 0.26.2
  • TypeScript version: 5.5.2
  • Node.js version: v20.14.0
  • OS: arch
@AlexAegis AlexAegis added the bug Functionality does not match expectation label Jun 25, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jun 26, 2024

The cause of this is your readme:

## config providers

These packages only contain configurations, that could be independently used

- [commitlint-config](packages/commitlint-config/)
- [eslint-config-core](packages/eslint-config-core/)
- [eslint-config-vitest](packages/eslint-config-vitest/)
- [lint-staged-config](packages/lint-staged-config/)
- [prettier-config](packages/prettier-config/)
- [remark-preset](packages/remark-preset/)
- [standard-version](packages/standard-version/)
- [stylelint-config](packages/stylelint-config/)
- [ts](packages/ts/)
- [turbowatch](packages/turbowatch/)
- [vite](packages/vite/)
- [vitest](packages/vitest/)

TypeDoc is seeing those relative links and deciding that they mean it ought to copy those directories to your documentation site. I didn't intend for relative link copying to include directories. With a patch to ignore directories, the generated site is back down to 2.1mb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

2 participants