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

fix(core): fix handling of Swc html minifier warnings #10581

Merged
merged 2 commits into from
Oct 13, 2024

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Oct 11, 2024

Motivation

The HTML SWC minifier diagnostic errors are too aggressive to throw

When we collect errors, we emit them as warnings with the ability to disable that warning, considering those markup errors existed before and are non-critical.

I created a troubleshooting guide for users looking to fix these warnings here: #10580

Test Plan

CI + local tests

CleanShot 2024-10-11 at 19 57 57@2x

Test links

https://deploy-preview-_____--docusaurus-2.netlify.app/

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Oct 11, 2024
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 11, 2024
Copy link

netlify bot commented Oct 11, 2024

[V2]

Name Link
🔨 Latest commit a4011c0
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/67096709a318cd0009f998fe
😎 Deploy Preview https://deploy-preview-10581--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

netlify bot commented Oct 11, 2024

[V2]

Name Link
🔨 Latest commit 3af9697
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/67096720c6132d0008aa31b7
😎 Deploy Preview https://deploy-preview-10581--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

Size Change: +349 B (0%)

Total Size: 11.2 MB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 28 kB 0 B
website/.docusaurus/globalData.json 30.2 kB 0 B
website/.docusaurus/i18n.json 930 B 0 B
website/.docusaurus/registry.js 155 kB 0 B
website/.docusaurus/routes.js 74.3 kB 0 B
website/.docusaurus/routesChunkNames.json 81.7 kB 0 B
website/.docusaurus/site-metadata.json 2.17 kB 0 B
website/build/assets/css/styles.********.css 120 kB 0 B
website/build/assets/js/main.********.js 728 kB 0 B
website/build/assets/js/runtime~main.********.js 35.8 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/plugins.html 29.9 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 59.5 kB +13 B (+0.02%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 189 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 194 kB +9 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 74 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 48 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-google-analytics.html 48.9 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 48.5 kB -4 B (-0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 47.3 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 48.4 kB +4 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 116 kB +4 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 65.3 kB +6 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 39.9 kB +12 B (+0.03%)
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

⚡️ Lighthouse report for the deploy preview of this PR

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

@slorber slorber changed the title fix(core): fix handling of SWC minifier warnings fix(core): fix handling of Swc html minifier warnings Oct 12, 2024
@slorber slorber merged commit 904b53b into main Oct 13, 2024
36 checks passed
@slorber slorber deleted the slorber/html-minimizer-diagnostics-should-warn branch October 13, 2024 07:58
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: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants