Skip to content

Docusaurus v3.8 - WIP upgrade #811

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

slorber
Copy link

@slorber slorber commented May 2, 2025

Docusaurus v3.8 upgrade

WIP, to test the branch locally for the Rspack team:

npm install --force
npm run rebuild-docs

# Build Docusaurus with Rspack tracing, stop after bundling
DOCUSAURUS_RSPACK_TRACE=true DOCUSAURUS_DISABLE_LAST_UPDATE=true DOCUSAURUS_EXIT_AFTER_BUNDLING=true npm run build

The Rspack settings can be adjusted from the plugins.ts file:

function disableExpensiveBundlerOptimizationPlugin() {
    return {
      name: 'disable-expensive-bundler-optimizations',
      configureWebpack() {
        return {
          optimization: {
            concatenateModules: false,
            mergeDuplicateChunks: false,
            removeAvailableModules: true,
          },
          experiments: {
            parallelCodeSplitting: true,
          } as any,
        };
      },
    };
  },

Old content

Follow up of conversation facebook/docusaurus#11140

With the upcoming v3.8 release:

  • SSG worker threads should greatly speed up SSG time (on my local Mac M3, from 27min to 6min) but I can't use more than 3 worker threads and it looks like memory is leaking (can't tell if it's from Docusaurus or your site yet)
  • Rspack persistent cache doesn't seem to improve warm re-bundling performance and is actually slower than v3.7 cold builds 😓 need to investigate

I was able to build your site in 25min instead of 40min. Still great, but I hope we can do better.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

2 participants