Docusaurus 3.2
We are happy to announce Docusaurus 3.2.
업그레이드 과정은 간단합니다. 도큐사우루스는 릴리스 프로세스 문서에 설명 된 대로 시맨틱 버전 체계를 준수해 마이너 버전은 하위 호환성을 유지합니다.
새로 추가된 기능
Faster builds
We worked hard to reduce the time it takes to build a Docusaurus site in production mode.
Between v3.1.0 and v3.2.0, several changes have been made, leading to significantly faster production builds for many sites.
Let's take an example. Our benchmark on the React Native website upgrading to v3.2 reports the following results:
- 🔥 Cold builds: 95s ➡️ 66s (~30% faster)
- 🔥 Incremental builds: 55s ➡️ 22s (~60% faster)
The results will vary depending on your site's topology and the options you turned on, but we expect the largest sites will see the most significant improvements.
Note that this is only the beginning, and Docusaurus performance can still be significantly improved, notably the bundling time and the memory consumption. Track our performance issue for upcoming improvements.
What is the difference between a cold build and an incremental build?
A cold build is when the Docusaurus caches are empty, generally after running docusaurus clear
.
An incremental build happens when you run another time the docusaurus build
command. Docusaurus automatically tries to "re-use" computations from former builds to make subsequent builds faster. In practice it's based on Webpack persistent caching. To enable incremental builds on your CI server, you can persist the node_modules/.cache
folder across builds.
Faster Dev Server
We also worked on improving the performance of the dev server, so that you can get a faster feedback when editing Markdown/MDX files.
The way we initially implemented content reloading wasn't great. For example, editing a blog post file would also trigger a useless reload of the unrelated docs plugin. From now on, when editing a plugin's content, only that plugin will reload. It's hard to measure precisely the impact of this change, but I estimate edits should appear in your browser at least 50% faster 🔥.
We plan to keep improving the speed of our dev server, with even more granular hot reloads, ensuring we don't run useless computations that would always keep giving the same result.