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

feat: new Rsdoctor official plugin #10588

Merged
merged 5 commits into from
Oct 17, 2024
Merged

feat: new Rsdoctor official plugin #10588

merged 5 commits into from
Oct 17, 2024

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Oct 17, 2024

Motivation

Rsdoctor helps troubleshoot slow Webpack/Rspack builds.

We use it on our website to optimize Docusaurus, but this could be useful for other site and third-party plugin authors as well, so let's make an official plugin for it.

The impl is able to support both Webpack (default) or Rspack (opt-in, see Docusaurus Faster)

The impl pass through the options to Rsdoctor without validating them. Users should refer to the official Rsdoctor options doc directly through the rsdoctorOptions.

Usage:

const config: {
  plugins: [
    ["rsdoctor",{rsdoctorOptions: {mode: "normal"}}]
  ],
}

I created a separate nested option object because we might add other Docusaurus prioprietary options later (that are not part of the Rsdoctor plugin options).

Test Plan

CI + dogfood on our own website

Test links

Docs: https://deploy-preview-10588--docusaurus-2.netlify.app/docs/api/plugins/@docusaurus/plugin-rsdoctor

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 17, 2024
@slorber slorber added the pr: new feature This PR adds a new API or behavior. label Oct 17, 2024
Copy link

netlify bot commented Oct 17, 2024

[V2]

Name Link
🔨 Latest commit 1019fd3
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6711283907566d0008f57573
😎 Deploy Preview https://deploy-preview-10588--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Oct 17, 2024

Size Change: +44.1 kB (+0.4%)

Total Size: 11.2 MB

Filename Size Change
website/.docusaurus/globalData.json 30.4 kB +182 B (+0.6%)
website/.docusaurus/registry.js 155 kB +224 B (+0.14%)
website/.docusaurus/routes.js 74.6 kB +265 B (+0.36%)
website/.docusaurus/routesChunkNames.json 81.8 kB +114 B (+0.14%)
website/build/assets/js/main.********.js 729 kB +492 B (+0.07%)
website/build/assets/js/runtime~main.********.js 35.8 kB +53 B (+0.15%)
website/build/docs/api/plugins.html 30.1 kB +198 B (+0.66%)
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 59.7 kB +211 B (+0.35%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 189 kB +198 B (+0.1%)
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 194 kB +207 B (+0.11%)
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 74.2 kB +198 B (+0.27%)
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 48.2 kB +198 B (+0.41%)
website/build/docs/api/plugins/@docusaurus/plugin-google-analytics.html 49.1 kB +198 B (+0.4%)
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 48.6 kB +174 B (+0.36%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 47.5 kB +192 B (+0.41%)
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 48.6 kB +202 B (+0.42%)
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 116 kB +202 B (+0.17%)
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 65.5 kB +204 B (+0.31%)
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 40.1 kB +210 B (+0.53%)
website/build/docs/api/plugins/@docusaurus/plugin-rsdoctor.html 39.8 kB +39.8 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 28 kB +1 B (0%)
website/.docusaurus/i18n.json 930 B 0 B
website/.docusaurus/site-metadata.json 2.17 kB 0 B
website/build/assets/css/styles.********.css 120 kB 0 B
website/build/blog.html 58.1 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus.html 72.2 kB 0 B
website/build/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html 45.1 kB +12 B (+0.03%)
website/build/blog/2018/09/11/Towards-Docusaurus-2.html 49.4 kB 0 B
website/build/blog/2018/12/14/Happy-First-Birthday-Slash.html 28.6 kB 0 B
website/build/blog/2019/12/30/docusaurus-2019-recap.html 37.5 kB -1 B (0%)
website/build/blog/2020/01/07/tribute-to-endi.html 32.1 kB 0 B
website/build/blog/2021/01/19/docusaurus-2020-recap.html 46.5 kB 0 B
website/build/blog/2021/03/09/releasing-docusaurus-i18n.html 42.9 kB -1 B (0%)
website/build/blog/2021/05/12/announcing-docusaurus-two-beta.html 45.2 kB 0 B
website/build/blog/2021/11/21/algolia-docsearch-migration.html 50.3 kB +12 B (+0.02%)
website/build/blog/2022/01/24/docusaurus-2021-recap.html 42.4 kB 0 B
website/build/blog/2022/08/01/announcing-docusaurus-2.0.html 134 kB 0 B
website/build/blog/2022/09/01/docusaurus-2.1.html 48.2 kB -1 B (0%)
website/build/blog/archive.html 23.1 kB 0 B
website/build/blog/authors.html 43.9 kB 0 B
website/build/blog/authors/j-marcey.html 61.9 kB 0 B
website/build/blog/authors/josh-cena.html 40.7 kB 0 B
website/build/blog/authors/lex-111.html 47.6 kB 0 B
website/build/blog/authors/slorber.html 58 kB 0 B
website/build/blog/authors/slorber/authors/2.html 61.8 kB 0 B
website/build/blog/authors/slorber/authors/3.html 73.6 kB 0 B
website/build/blog/authors/slorber/authors/4.html 42.1 kB 0 B
website/build/blog/authors/yangshun.html 54.8 kB 0 B
website/build/blog/authors/zpao.html 41.1 kB 0 B
website/build/blog/page/2.html 62.6 kB 0 B
website/build/blog/page/3.html 68.3 kB 0 B
website/build/blog/page/4.html 61.1 kB 0 B
website/build/blog/page/5.html 39.8 kB 0 B
website/build/blog/preparing-your-site-for-docusaurus-v3.html 132 kB +4 B (0%)
website/build/blog/releases/2.2.html 47.1 kB 0 B
website/build/blog/releases/2.3.html 57.9 kB 0 B
website/build/blog/releases/2.4.html 62.1 kB 0 B
website/build/blog/releases/3.0.html 107 kB +12 B (+0.01%)
website/build/blog/releases/3.1.html 49.5 kB +1 B (0%)
website/build/blog/releases/3.2.html 46.3 kB 0 B
website/build/blog/releases/3.3.html 52.9 kB 0 B
website/build/blog/releases/3.4.html 53.1 kB +7 B (+0.01%)
website/build/blog/releases/3.5.html 55.3 kB +1 B (0%)
website/build/blog/tags.html 26.7 kB 0 B
website/build/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing.html 123 kB 0 B
website/build/docs.html 47 kB 0 B
website/build/docs/advanced.html 29.4 kB 0 B
website/build/docs/advanced/architecture.html 28.9 kB +4 B (+0.01%)
website/build/docs/advanced/client.html 72.7 kB 0 B
website/build/docs/advanced/plugins.html 56 kB 0 B
website/build/docs/advanced/routing.html 70.8 kB +8 B (+0.01%)
website/build/docs/advanced/ssg.html 77.8 kB 0 B
website/build/docs/api/docusaurus-config.html 194 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin.html 45.7 kB +4 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-html-links.html 36 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-untranslated-text.html 34.9 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading.html 36.2 kB +4 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages.html 39.8 kB 0 B
website/build/docs/api/misc/@docusaurus/logger.html 37.9 kB 0 B
website/build/docs/api/misc/create-docusaurus.html 33 kB 0 B
website/build/docs/api/plugin-methods.html 64.6 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/extend-infrastructure.html 60.2 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/i18n-lifecycles.html 58.1 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/lifecycle-apis.html 164 kB 0 B
website/build/docs/api/plugin-methods/static-methods.html 44.4 kB +4 B (+0.01%)
website/build/docs/api/themes.html 28.7 kB 0 B
website/build/docs/api/themes/@docusaurus/theme-classic.html 44 kB +4 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-live-codeblock.html 36.6 kB +4 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-mermaid.html 35.5 kB +4 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-search-algolia.html 32.8 kB 0 B
website/build/docs/api/themes/configuration.html 243 kB 0 B
website/build/docs/blog.html 211 kB +6 B (0%)
website/build/docs/browser-support.html 48.4 kB 0 B
website/build/docs/category/getting-started.html 26.6 kB 0 B
website/build/docs/category/guides.html 34.5 kB 0 B
website/build/docs/cli.html 59.9 kB +1 B (0%)
website/build/docs/configuration.html 98.7 kB +8 B (+0.01%)
website/build/docs/create-doc.html 62.3 kB +12 B (+0.02%)
website/build/docs/creating-pages.html 56.4 kB +1 B (0%)
website/build/docs/deployment.html 203 kB +8 B (0%)
website/build/docs/docs-introduction.html 50.9 kB 0 B
website/build/docs/docs-multi-instance.html 75 kB +4 B (+0.01%)
website/build/docs/docusaurus-core.html 236 kB 0 B
website/build/docs/guides/whats-next.html 30.9 kB 0 B
website/build/docs/i18n/crowdin.html 145 kB +12 B (+0.01%)
website/build/docs/i18n/git.html 78.8 kB +4 B (+0.01%)
website/build/docs/i18n/introduction.html 48.3 kB 0 B
website/build/docs/i18n/tutorial.html 164 kB +13 B (+0.01%)
website/build/docs/installation.html 70.7 kB +5 B (+0.01%)
website/build/docs/introduction/index.html 280 B 0 B
website/build/docs/markdown-features.html 79.9 kB +1 B (0%)
website/build/docs/markdown-features/admonitions.html 113 kB +4 B (0%)
website/build/docs/markdown-features/assets.html 89.2 kB +2 B (0%)
website/build/docs/markdown-features/code-blocks.html 235 kB +4 B (0%)
website/build/docs/markdown-features/diagrams.html 53.1 kB +14 B (+0.03%)
website/build/docs/markdown-features/head-metadata.html 50.1 kB 0 B
website/build/docs/markdown-features/links.html 40.8 kB 0 B
website/build/docs/markdown-features/math-equations.html 90.5 kB +11 B (+0.01%)
website/build/docs/markdown-features/plugins.html 96.6 kB +8 B (+0.01%)
website/build/docs/markdown-features/react.html 138 kB +5 B (0%)
website/build/docs/markdown-features/tabs.html 142 kB 0 B
website/build/docs/markdown-features/toc.html 84.8 kB +4 B (0%)
website/build/docs/migration.html 40.7 kB +4 B (+0.01%)
website/build/docs/migration/v2.html 39.1 kB 0 B
website/build/docs/migration/v2/automated.html 40.4 kB 0 B
website/build/docs/migration/v2/manual.html 198 kB 0 B
website/build/docs/migration/v2/translated-sites.html 50.3 kB 0 B
website/build/docs/migration/v2/versioned-sites.html 64.2 kB 0 B
website/build/docs/migration/v3.html 209 kB +1 B (0%)
website/build/docs/playground.html 30.7 kB 0 B
website/build/docs/resources/index.html 325 B 0 B
website/build/docs/search.html 116 kB +1 B (0%)
website/build/docs/seo.html 88.7 kB +13 B (+0.01%)
website/build/docs/sidebar.html 130 kB +4 B (0%)
website/build/docs/sidebar/autogenerated.html 150 kB +13 B (+0.01%)
website/build/docs/sidebar/items.html 180 kB 0 B
website/build/docs/sidebar/multiple-sidebars.html 63.7 kB +4 B (+0.01%)
website/build/docs/static-assets.html 53.4 kB +4 B (+0.01%)
website/build/docs/styling-layout.html 135 kB 0 B
website/build/docs/support/index.html 319 B 0 B
website/build/docs/swizzling.html 115 kB +14 B (+0.01%)
website/build/docs/team/index.html 310 B 0 B
website/build/docs/typescript-support.html 62.3 kB 0 B
website/build/docs/using-plugins.html 110 kB +13 B (+0.01%)
website/build/docs/versioning.html 83.1 kB +13 B (+0.02%)
website/build/index.html 35.8 kB 0 B

compressed-size-action

Copy link

github-actions bot commented Oct 17, 2024

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🟠 59 🟢 98 🟢 96 🟢 100 Report
/docs/installation 🟠 53 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 73 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 62 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🔴 48 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 64 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 74 🟢 100 🟢 100 🟠 86 Report

@slorber slorber merged commit 2471678 into main Oct 17, 2024
36 checks passed
@slorber slorber deleted the slorber/plugin-rsdoctor branch October 17, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants