Skip to content

Commit 4709cd1

Browse files
slorberfacebook-github-bot
authored andcommitted
chore: Docusaurus with webpack 5 (#3469)
Summary: Use an unreleased version of Docusaurus to test the webpack5 support works for this site, detect potential problems, and perf improvements. See also facebook/docusaurus#4089 Perf improvements - First build (local): 300s - Second build (local): 90s To get the benefits, it requires caching `node_modules/.cache`. It is not possible in GH actions, so I suggest migrating the site to Netlify and use the appropriate toml config (example: https://github.com/react-navigation/react-navigation.github.io/pull/974/files) --- Unrelated suggestion: Relay has a lot of versions and long build/start times Assuming nobody ever edit Relay docs of 2 years ago, you can improve the DX by limiting the number of versions display in dev with this docs plugin config: ``` onlyIncludeVersions: (isDev || isDeployPreview) ? ['current', ...versions.slice(0, 2)] : undefined, ``` For faster prod build, you can also move older docs to standalone deployments and link to them (see Jest for versions < 25 => https://jestjs.io/) Pull Request resolved: #3469 Reviewed By: rbalicki2 Differential Revision: D28127629 Pulled By: jstejada fbshipit-source-id: c78309aa1c7f14f22ecc33166ad5dce7d2e51f94
1 parent 4c9becb commit 4709cd1

File tree

2 files changed

+2817
-3539
lines changed

2 files changed

+2817
-3539
lines changed

website/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
"docusaurus": "docusaurus"
1919
},
2020
"dependencies": {
21-
"@docusaurus/core": "2.0.0-alpha.70",
22-
"@docusaurus/plugin-client-redirects": "2.0.0-alpha.70",
23-
"@docusaurus/preset-classic": "2.0.0-alpha.70",
21+
"@docusaurus/core": "2.0.0-alpha.75",
22+
"@docusaurus/plugin-client-redirects": "2.0.0-alpha.75",
23+
"@docusaurus/preset-classic": "2.0.0-alpha.75",
2424
"classnames": "^2.2.6",
2525
"clsx": "^1.1.1",
26-
"docusaurus-plugin-internaldocs-fb": "^0.7.0",
27-
"react": "^16.10.2",
28-
"react-dom": "^16.10.2",
26+
"docusaurus-plugin-internaldocs-fb": "^0.8.5",
27+
"react": "^17.0.2",
28+
"react-dom": "^17.0.2",
2929
"react-syntax-highlighter": "15.3.1",
3030
"spec-md": "^1.1.1"
3131
},
3232
"devDependencies": {
33-
"docusaurus": "^2.0.0-alpha.70"
33+
"docusaurus": "2.0.0-alpha.378053ac5"
3434
},
3535
"resolutions": {
3636
"highlight.js": "^10.4.1"

0 commit comments

Comments
 (0)