Docusaurus Faster
We love Docusaurus! The platform has powered our blog for about 2.5 years and made it easier than ever to contribute and publish articles.
However, a static site generator like Docusaurus has its own set of problems, such as long build times for larger sites.
In our case, that means the CI pipeline to build the Docusaurus site runs for about 8 to 9 minutes. Not too bad but still a bit annoying if you want to publish a change quickly.
Luckily, the Docusaurus team is aware of the issue and is working on a solution, namely the "Docusaurus Faster" project. The first experimental release happened a few weeks ago, and I could integrate it into our CI pipeline without any issues.
Docusaurus Faster is a separate dependency that uses faster Rust-based tools like Rspack, SWC, and Lightning CSS under the hood.
To install Docusaurus Faster, run the following command:
yarn add @docusaurus/faster
Enable the experimental feature in the docusaurus.config.js
file by adding the following lines:
future: {
experimental_faster: true
}
And that's it!
How much faster are builds powered by Docusaurus Faster?
In our case, Docusaurus Faster reduced the build time from about 8 minutes to about 4 minutes. That's a pretty big achievement if you ask me. If you haven't tried Docusaurus Faster yet, give it a try and report problems here.