Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue URL: internal
What is the current behavior?
The docs build with the default Docusaurus toolchain: Webpack for bundling, Babel for transpiling, Terser for JS minification, and html-minifier-terser for HTML. A full English build takes about 91s wall clock and 166s of CPU.
Docusaurus Faster was experimental until 3.10, which marks it stable and renames the config flag. It becomes the default in v4 and is already used for newly initialized v3 sites, so staying on the old toolchain leaves us behind on both build times and v4 readiness.
What is the new behavior?
Docusaurus Faster is enabled, swapping in Rspack, SWC, and Lightning CSS.
@docusaurus/fasterand setsfuture.faster: truefuture.v4.removeLegacyPostBuildHeadAttribute, which thessgWorkerThreadspart offasterrequires. Nothing in this repo reads the legacyheadargument inpostBuild, so this is inert for usbabel.config.js, which SWC replaces and which Docusaurus warns about while it is still presentBuild time drops from 91s to 21s wall clock, and CPU from 166s to 51s.
SWC's HTML minifier is spec-strict where html-minifier-terser was permissive, so enabling Faster surfaced 16 pages of pre-existing invalid markup. Those are fixed here rather than suppressed, taking the build from 16 SSG warnings to 0:
<p>, which MDX gave a second paragraph inside<div>landed inside a<p>Link text is now descriptive rather than a raw URL, which also makes these links usable with a screen reader, and the surrounding prose uses "refer to" in place of "see".
Does this introduce a breaking change?
Other information
npm run clearis less forgiving now.future.fasterincludesrspackPersistentCache, and deletingnode_modules/.cachewhile a dev server is running makes Rspack panic and abort the process instead of falling back to a cold rebuild. Restartingnpm startrecovers fully. This only happens if the cache is destroyed underneath a live compile, so it is a heads-up rather than a blocker.