You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have recently been experimenting with using different frameworks for building our documentation website. I decided to try building our documentation with Vitepress because of the native integration with Shiki Twoslash (via @shikijs/vitepress-twoslash), which we make extensive use of in our docs.
However, when I attempt to build our documentation with Vitepress and Shiki Twoslash, I consistently receive a JavaScript heap out of memory error. I have attempted to increase the --max-old-space-size to ~8GB and still encounter this issue.
With Twoslash Integration
In my .vitepress/config.ts, if I remove the transformerTwoslash from the markdown.codeTransformers array, the build succeeds without issue in ~20 seconds.
My expected behavior would be for Vitepress to be able to build our docs with Shiki Twoslash integrated without issue.
System Info
System:
OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Pro
Memory: 1.99 GB / 16.00 GB
Shell: 5.9 - /nix/store/w53pgqwh5dm38skdd7n7wn0k6cw72jzj-zsh-5.9/bin/zsh
Binaries:
Node: 20.17.0 - /nix/store/hxl1k8qgmrm1vfq5f419iv4wybz9szqq-nodejs-20.17.0/bin/node
npm: 10.8.2 - /nix/store/hxl1k8qgmrm1vfq5f419iv4wybz9szqq-nodejs-20.17.0/bin/npm
pnpm: 9.10.0 - /nix/store/ddjsxwcpw09llisgvw7drvr92dbkg4mi-corepack-nodejs-20.17.0/bin/pnpm
Browsers:
Chrome: 129.0.6668.70
Safari: 17.6
npmPackages:
vitepress: ^1.3.4 => 1.3.4
Note: I use Nix for provisioning my system, hence the strange looking binary paths.
Additional context
I've included a script in the package.json that reduces the available NodeJS heap memory (to force an OOM earlier) and takes a heap snapshot right before an OOM error occurs in case that is useful for you folks.
Validations
Describe the bug
Hello 👋 from the Effect-TS community :)
We have recently been experimenting with using different frameworks for building our documentation website. I decided to try building our documentation with Vitepress because of the native integration with Shiki Twoslash (via
@shikijs/vitepress-twoslash
), which we make extensive use of in our docs.However, when I attempt to build our documentation with Vitepress and Shiki Twoslash, I consistently receive a
JavaScript heap out of memory
error. I have attempted to increase the--max-old-space-size
to ~8GB and still encounter this issue.With Twoslash Integration
In my
.vitepress/config.ts
, if I remove thetransformerTwoslash
from themarkdown.codeTransformers
array, the build succeeds without issue in ~20 seconds.Without Twoslash Integration
Tracking issue with Vitepress: vuejs/vitepress#4242
Expected behavior
My expected behavior would be for Vitepress to be able to build our docs with Shiki Twoslash integrated without issue.
System Info
Additional context
I've included a script in the
package.json
that reduces the available NodeJS heap memory (to force an OOM earlier) and takes a heap snapshot right before an OOM error occurs in case that is useful for you folks.Reproduction
https://github.com/IMax153/vitepress-memory-leak-repro.git
Clone our docs experiment
Install dependencies
Attempt to build
Contributes
The text was updated successfully, but these errors were encountered: