Skip to content

chore(docusaurus): enable faster - #4619

Draft
thetaPC wants to merge 1 commit into
mainfrom
FW-7656
Draft

chore(docusaurus): enable faster#4619
thetaPC wants to merge 1 commit into
mainfrom
FW-7656

Conversation

@thetaPC

@thetaPC thetaPC commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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.

  • Adds @docusaurus/faster and sets future.faster: true
  • Enables future.v4.removeLegacyPostBuildHeadAttribute, which the ssgWorkerThreads part of faster requires. Nothing in this repo reads the legacy head argument in postBuild, so this is inert for us
  • Deletes babel.config.js, which SWC replaces and which Docusaurus warns about while it is still present

Build 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:

Cause Pages
A URL used as its own link text, which Markdown autolinked into a nested anchor The 6 Swiper migration pages, current and v7
An email address used as its own link text, same mechanism Code of conduct, current and v7
A multi-line raw <p>, which MDX gave a second paragraph inside Components and glossary (current and v7), JavaScript overview
The above, plus an anchor starting the paragraph CSS Shadow Parts, current and v7
A code fence that closed early, rendering markup whose inner <div> landed inside a <p> v7 Dynamic Font Scaling

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?

  • Yes
  • No

Other information

npm run clear is less forgiving now. future.faster includes rspackPersistentCache, and deleting node_modules/.cache while a dev server is running makes Rspack panic and abort the process instead of falling back to a cold rebuild. Restarting npm start recovers fully. This only happens if the cache is destroyed underneath a live compile, so it is a heads-up rather than a blocker.

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-docs Ready Ready Preview Aug 6, 2026 6:30pm

Request Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant