Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Docusaurus with webpack 5 #3469

Closed
wants to merge 9 commits into from

Conversation

slorber
Copy link
Contributor

@slorber slorber commented Apr 23, 2021

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/)

website/sitePlugin.js Outdated Show resolved Hide resolved
website/sitePlugin.js Outdated Show resolved Hide resolved
@slorber slorber marked this pull request as ready for review April 30, 2021 17:45
@slorber
Copy link
Contributor Author

slorber commented Apr 30, 2021

ready for review

@facebook-github-bot
Copy link
Contributor

@jstejada has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@jstejada has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@jstejada
Copy link
Contributor

nvm i was making a mistake, attempting to land this locally now

@facebook-github-bot
Copy link
Contributor

@jstejada merged this pull request in 4709cd1.

@christianvuerings
Copy link
Contributor

christianvuerings commented May 21, 2021

@jsteiner @slorber I think this change causes an issue with zIndexes on the relay docs site:

image

@slorber
Copy link
Contributor Author

slorber commented May 24, 2021 via email

@slorber slorber mentioned this pull request Jun 2, 2021
@slorber
Copy link
Contributor Author

slorber commented Jun 2, 2021

Fixing website CSS issue in #3505

facebook-github-bot pushed a commit that referenced this pull request Jun 3, 2021
Summary:
Docusaurus beta 0 has been released so let's use it!

Also, you are currently affected by an annoying regression in a Docusaurus transitive dependency ([email protected] => facebook/docusaurus#4826)

Reported by christianvuerings here: #3469 (comment)

![image](https://user-images.githubusercontent.com/749374/120523199-ed342500-c3d5-11eb-9971-71d7106f1843.png)

This should now be fixed by re-generating the lockfile.

Pull Request resolved: #3505

Reviewed By: kassens

Differential Revision: D28874560

Pulled By: rbalicki2

fbshipit-source-id: 6baece255be570abd5ec5f19f10e7f503be482f9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants