Skip to content

feat(core): support importing files as raw text with import attributes (AI-assisted) - #12491

Merged
slorber merged 6 commits into
slorber/mdx-ecmaversion-2025from
slorber/import-text-attributes
Sep 24, 2026
Merged

slorber merged 6 commits into
slorber/mdx-ecmaversion-2025from
slorber/import-text-attributes

Conversation

@slorber

@slorber slorber commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Stacked on #12488 (MDX parsed with ES2025), itself stacked on #12484.

You can now import any file as raw text with the standard import attributes syntax. It works in both MDX and JS/TS files, on both Rspack and webpack. This replaces the !!raw-loader! pattern (AI-assisted).

import MyComponentSource from './myComponent.tsx' with {type: 'text'};

Two things prevented this from working:

  1. Loaders still ran on text imports. Rspack and webpack both ship a default {with: {type: 'text'}, type: 'asset/source'} rule, but every other matching rule still applied its loaders first. A .tsx file imported as text came back transpiled, a .md file compiled, a .svg file turned into an SVGR component, and so on. Every rule Docusaurus defines now has an explicit with: {type: {not: 'text'}} condition (rules[].with): core JS/CSS/CSS modules, the asset rules in @docusaurus/utils (images, SVG, fonts, media, files), createMDXLoaderRule() (docs/blog/pages), the synthetic MDX fallback, ideal-image, and the SVGR wrapper rule. Third-party plugin rules are not modified. This behaves the same with the latest Rspack (2.2.7).
  2. SWC dropped import attributes. Without jsc.experimental.keepImportAttributes, SWC silently removes with {…}. On Docusaurus Faster, attributes in JS/TS files were ignored, including with {type: 'json'}. That flag is now enabled.

Docs:

  • The "Importing code snippets" section now uses import attributes.
  • The raw-loader usages in the current docs and dogfooding pages are replaced.
  • Versioned docs are unchanged: they document older versions. The website keeps its raw-loader dependency for them.

Test Plan

  • Unit test: every core base rule excludes text import attributes.
  • New dogfooding folder _dogfooding/_pages tests/import-attributes/, with a single MDX page. It imports 11 fixtures as text (JS, TS, TSX, JSON, CSS, CSS module, SVG, MD, MDX, YAML and TXT), then renders JSX and TSX components that do the same imports. Each result is checked for a raw-source snippet that a loader would transform. A failure throws, so a regression fails the website build.
  • Built with Rspack (default) and webpack (DOCUSAURUS_SLOWER=true), with clean caches: 33/33 pass (11 fixtures in MDX, JSX and TSX) with both bundlers. With the fix disabled, the build fails.
  • The code blocks on the 5 pages that used raw-loader render identical content to main. Only the documentation examples changed.

Test links

Deploy preview: https://deploy-preview-12491--docusaurus-2.netlify.app/

Related issues/PRs

🤖 Generated with Claude Code

@slorber
slorber requested a review from Josh-Cena as a code owner September 24, 2026 15:57
@slorber slorber added pr: new feature This PR adds a new API or behavior. Argos Add this label to run UI visual regression tests. See argos.yml GH action. labels Sep 24, 2026
@meta-cla meta-cla Bot added the CLA Signed Signed Facebook CLA label Sep 24, 2026
@slorber
slorber added this pull request to stack #12490 September 24, 2026 15:57
@slorber slorber added Argos Add this label to run UI visual regression tests. See argos.yml GH action. and removed Argos Add this label to run UI visual regression tests. See argos.yml GH action. labels Sep 24, 2026
@netlify

netlify Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

✅ [V2]

Name Link
🔨 Latest commit 918ef83
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6ab552d92afa87000845eafa
😎 Deploy Preview https://deploy-preview-12491--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@slorber
slorber force-pushed the slorber/import-text-attributes branch from 7a69f72 to f13af2f Compare September 24, 2026 16:11
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Size Change: -2.89 kB (-0.02%)

Total Size: 12.4 MB

📦 View Changed
Filename Size Change
website/build/docs/markdown-features/react.html 131 kB -2.89 kB (-2.16%)
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 29 kB 0 B
website/.docusaurus/globalData.json 39.1 kB 0 B
website/.docusaurus/i18n.json 1.36 kB 0 B
website/.docusaurus/registry.js 180 kB 0 B
website/.docusaurus/routes.js 89.8 kB -12 B (-0.01%)
website/.docusaurus/routesChunkNames.json 94 kB -6 B (-0.01%)
website/.docusaurus/site-metadata.json 2.59 kB 0 B
website/build/assets/css/styles.********.css 147 kB 0 B
website/build/assets/js/main.********.js 761 kB +19 B (0%)
website/build/assets/js/runtime~main.********.js 40.3 kB 0 B
website/build/blog.html 79.5 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus.html 67.4 kB +1 B (0%)
website/build/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html 46.5 kB +1 B (0%)
website/build/blog/2018/09/11/Towards-Docusaurus-2.html 50.9 kB +6 B (+0.01%)
website/build/blog/2018/12/14/Happy-First-Birthday-Slash.html 30.5 kB +1 B (0%)
website/build/blog/2019/12/30/docusaurus-2019-recap.html 41.6 kB +1 B (0%)
website/build/blog/2020/01/07/tribute-to-endi.html 34 kB +1 B (0%)
website/build/blog/2021/01/19/docusaurus-2020-recap.html 53.2 kB +1 B (0%)
website/build/blog/2021/03/09/releasing-docusaurus-i18n.html 49.1 kB +1 B (0%)
website/build/blog/2021/05/12/announcing-docusaurus-two-beta.html 49.7 kB +1 B (0%)
website/build/blog/2021/11/21/algolia-docsearch-migration.html 56.1 kB +1 B (0%)
website/build/blog/2022/01/24/docusaurus-2021-recap.html 45 kB +1 B (0%)
website/build/blog/2022/08/01/announcing-docusaurus-2.0.html 137 kB +1 B (0%)
website/build/blog/2022/09/01/docusaurus-2.1.html 52 kB +1 B (0%)
website/build/blog/archive.html 24.8 kB 0 B
website/build/blog/authors.html 52.1 kB 0 B
website/build/blog/authors/j-marcey.html 72.4 kB 0 B
website/build/blog/authors/josh-cena.html 48.5 kB 0 B
website/build/blog/authors/lex-111.html 57.5 kB 0 B
website/build/blog/authors/slorber.html 83.1 kB 0 B
website/build/blog/authors/slorber/page/2.html 82.3 kB 0 B
website/build/blog/authors/slorber/page/3.html 86 kB 0 B
website/build/blog/authors/slorber/page/4.html 98.7 kB 0 B
website/build/blog/authors/slorber/page/5.html 55 kB 0 B
website/build/blog/authors/yangshun.html 68.3 kB 0 B
website/build/blog/authors/zpao.html 49 kB 0 B
website/build/blog/page/2.html 78.7 kB 0 B
website/build/blog/page/3.html 83.1 kB 0 B
website/build/blog/page/4.html 87.6 kB 0 B
website/build/blog/page/5.html 74.8 kB 0 B
website/build/blog/page/6.html 42.1 kB 0 B
website/build/blog/preparing-your-site-for-docusaurus-v3.html 129 kB +1 B (0%)
website/build/blog/releases/2.2.html 52.2 kB +1 B (0%)
website/build/blog/releases/2.3.html 62.8 kB 0 B
website/build/blog/releases/2.4.html 66.4 kB +1 B (0%)
website/build/blog/releases/3.0.html 109 kB +1 B (0%)
website/build/blog/releases/3.1.html 54.9 kB +1 B (0%)
website/build/blog/releases/3.2.html 50.7 kB +1 B (0%)
website/build/blog/releases/3.3.html 58 kB +1 B (0%)
website/build/blog/releases/3.4.html 57 kB +1 B (0%)
website/build/blog/releases/3.5.html 59.9 kB +1 B (0%)
website/build/blog/releases/3.6.html 78.6 kB +1 B (0%)
website/build/blog/releases/3.7.html 52.5 kB +1 B (0%)
website/build/blog/releases/3.8.html 88 kB +6 B (+0.01%)
website/build/blog/releases/3.9.html 62.7 kB +1 B (0%)
website/build/blog/releases/3.10.html 93.1 kB +1 B (0%)
website/build/blog/tags.html 28.7 kB 0 B
website/build/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing.html 126 kB +1 B (0%)
website/build/docs.html 52.3 kB 0 B
website/build/docs/advanced.html 31.7 kB 0 B
website/build/docs/advanced/architecture.html 30.3 kB +4 B (+0.01%)
website/build/docs/advanced/client.html 70.2 kB +1 B (0%)
website/build/docs/advanced/plugins.html 55.3 kB +1 B (0%)
website/build/docs/advanced/routing.html 70.6 kB +1 B (0%)
website/build/docs/advanced/ssg.html 75 kB +1 B (0%)
website/build/docs/api/docusaurus-config.html 241 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin.html 51.2 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-html-links.html 36.7 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-untranslated-text.html 35.7 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading.html 37 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages.html 40.7 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/logger.html 39.2 kB +1 B (0%)
website/build/docs/api/misc/create-docusaurus.html 38.2 kB +8 B (+0.02%)
website/build/docs/api/misc/docusaurus-init/index.html 361 B 0 B
website/build/docs/api/plugin-methods.html 63 kB +9 B (+0.01%)
website/build/docs/api/plugin-methods/extend-infrastructure.html 59 kB 0 B
website/build/docs/api/plugin-methods/i18n-lifecycles.html 58 kB +1 B (0%)
website/build/docs/api/plugin-methods/lifecycle-apis.html 162 kB +1 B (0%)
website/build/docs/api/plugin-methods/static-methods.html 45.1 kB +1 B (0%)
website/build/docs/api/plugins.html 32.6 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 59.9 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 186 kB +6 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 193 kB +6 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 74.8 kB +6 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-css-cascade-layers.html 47.5 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 48.1 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 49.1 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 47.9 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 57.5 kB +4 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 117 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-rsdoctor.html 40.6 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 65.8 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-svgr.html 45.7 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 41 kB +1 B (0%)
website/build/docs/api/themes.html 30.2 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-classic.html 43.8 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-live-codeblock.html 36.9 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-mermaid.html 35.6 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-search-algolia.html 33.4 kB 0 B
website/build/docs/api/themes/configuration.html 252 kB +1 B (0%)
website/build/docs/blog.html 203 kB +1 B (0%)
website/build/docs/browser-support.html 48.2 kB +6 B (+0.01%)
website/build/docs/category/getting-started.html 28.5 kB 0 B
website/build/docs/category/guides.html 39 kB 0 B
website/build/docs/category/miscellaneous.html 28.3 kB 0 B
website/build/docs/cli.html 67.2 kB 0 B
website/build/docs/configuration.html 92.6 kB 0 B
website/build/docs/create-doc.html 61.8 kB +1 B (0%)
website/build/docs/creating-pages.html 57.5 kB +1 B (0%)
website/build/docs/deployment.html 66.8 kB 0 B
website/build/docs/deployment/github-pages.html 119 kB 0 B
website/build/docs/deployment/netlify.html 39.2 kB 0 B
website/build/docs/deployment/vercel.html 33.3 kB 0 B
website/build/docs/docs-introduction.html 51 kB +1 B (0%)
website/build/docs/docs-multi-instance.html 74 kB +1 B (0%)
website/build/docs/docusaurus-core.html 226 kB +1 B (0%)
website/build/docs/guides/whats-next.html 33.3 kB 0 B
website/build/docs/i18n/crowdin.html 147 kB +1 B (0%)
website/build/docs/i18n/git.html 79.9 kB +8 B (+0.01%)
website/build/docs/i18n/introduction.html 49.7 kB 0 B
website/build/docs/i18n/tutorial.html 168 kB 0 B
website/build/docs/installation.html 70 kB 0 B
website/build/docs/introduction/index.html 280 B 0 B
website/build/docs/markdown-features.html 85.3 kB +2 B (0%)
website/build/docs/markdown-features/admonitions.html 118 kB +1 B (0%)
website/build/docs/markdown-features/assets.html 87.2 kB +1 B (0%)
website/build/docs/markdown-features/code-blocks.html 220 kB +13 B (+0.01%)
website/build/docs/markdown-features/diagrams.html 61.3 kB 0 B
website/build/docs/markdown-features/head-metadata.html 51.4 kB +1 B (0%)
website/build/docs/markdown-features/links.html 41.3 kB +6 B (+0.01%)
website/build/docs/markdown-features/math-equations.html 92.1 kB +1 B (0%)
website/build/docs/markdown-features/plugins.html 96.2 kB +1 B (0%)
website/build/docs/markdown-features/tabs.html 141 kB +1 B (0%)
website/build/docs/markdown-features/toc.html 87.3 kB +1 B (0%)
website/build/docs/migration.html 39.7 kB +1 B (0%)
website/build/docs/migration/v2.html 39.9 kB +1 B (0%)
website/build/docs/migration/v2/automated.html 40.3 kB +1 B (0%)
website/build/docs/migration/v2/manual.html 190 kB +1 B (0%)
website/build/docs/migration/v2/translated-sites.html 51.2 kB +1 B (0%)
website/build/docs/migration/v2/versioned-sites.html 60.3 kB +1 B (0%)
website/build/docs/migration/v3.html 191 kB +2 B (0%)
website/build/docs/playground.html 32 kB 0 B
website/build/docs/resources/index.html 325 B 0 B
website/build/docs/search.html 124 kB +1 B (0%)
website/build/docs/seo.html 88.7 kB 0 B
website/build/docs/sidebar.html 140 kB +1 B (0%)
website/build/docs/sidebar/autogenerated.html 147 kB +1 B (0%)
website/build/docs/sidebar/items.html 175 kB +1 B (0%)
website/build/docs/sidebar/multiple-sidebars.html 62.4 kB +1 B (0%)
website/build/docs/static-assets.html 52.3 kB +1 B (0%)
website/build/docs/styling-layout.html 141 kB +4 B (0%)
website/build/docs/support/index.html 319 B 0 B
website/build/docs/swizzling.html 112 kB +1 B (0%)
website/build/docs/team/index.html 310 B 0 B
website/build/docs/typescript-support.html 67.5 kB 0 B
website/build/docs/using-plugins.html 106 kB 0 B
website/build/docs/versioning.html 92.4 kB 0 B
website/build/index.html 37.1 kB 0 B

compressed-size-action::DOCUSAURUS_INFRA_FASTER

@argos-ci

argos-ci Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
screenshots (Inspect) 👍 Approved by Sébastien Lorber 2 changed, 1 added, 2 removed Sep 24, 2026, 4:45 PM
text-snapshots (Inspect) 👍 Approved by Sébastien Lorber 1 changed Sep 24, 2026, 4:45 PM

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🟠 54 🟢 98 🟢 100 🟢 100 Report
/docs/installation 🟠 52 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 70 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 66 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 67 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 64 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 70 🟢 100 🟢 100 🟠 86 Report

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Size Change: -2.91 kB (-0.02%)

Total Size: 12.5 MB

📦 View Changed
Filename Size Change
website/build/docs/markdown-features/react.html 132 kB -2.91 kB (-2.15%)
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 29.1 kB 0 B
website/.docusaurus/globalData.json 39.1 kB 0 B
website/.docusaurus/i18n.json 1.36 kB 0 B
website/.docusaurus/registry.js 180 kB 0 B
website/.docusaurus/routes.js 89.8 kB -12 B (-0.01%)
website/.docusaurus/routesChunkNames.json 94 kB -6 B (-0.01%)
website/.docusaurus/site-metadata.json 2.44 kB 0 B
website/build/assets/css/styles.********.css 139 kB 0 B
website/build/assets/js/main.********.js 763 kB +18 B (0%)
website/build/assets/js/runtime~main.********.js 40.2 kB 0 B
website/build/blog.html 80.3 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus.html 67.8 kB +1 B (0%)
website/build/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html 47 kB +1 B (0%)
website/build/blog/2018/09/11/Towards-Docusaurus-2.html 51.4 kB +6 B (+0.01%)
website/build/blog/2018/12/14/Happy-First-Birthday-Slash.html 30.9 kB +1 B (0%)
website/build/blog/2019/12/30/docusaurus-2019-recap.html 42.1 kB +1 B (0%)
website/build/blog/2020/01/07/tribute-to-endi.html 34.5 kB +1 B (0%)
website/build/blog/2021/01/19/docusaurus-2020-recap.html 53.7 kB +1 B (0%)
website/build/blog/2021/03/09/releasing-docusaurus-i18n.html 49.6 kB +1 B (0%)
website/build/blog/2021/05/12/announcing-docusaurus-two-beta.html 50.3 kB +1 B (0%)
website/build/blog/2021/11/21/algolia-docsearch-migration.html 56.7 kB +1 B (0%)
website/build/blog/2022/01/24/docusaurus-2021-recap.html 45.5 kB +1 B (0%)
website/build/blog/2022/08/01/announcing-docusaurus-2.0.html 138 kB +1 B (0%)
website/build/blog/2022/09/01/docusaurus-2.1.html 52.6 kB +1 B (0%)
website/build/blog/archive.html 25.2 kB 0 B
website/build/blog/authors.html 52.7 kB 0 B
website/build/blog/authors/j-marcey.html 73.1 kB 0 B
website/build/blog/authors/josh-cena.html 49.1 kB 0 B
website/build/blog/authors/lex-111.html 58.1 kB 0 B
website/build/blog/authors/slorber.html 84 kB 0 B
website/build/blog/authors/slorber/page/2.html 83.2 kB 0 B
website/build/blog/authors/slorber/page/3.html 86.8 kB 0 B
website/build/blog/authors/slorber/page/4.html 99.6 kB 0 B
website/build/blog/authors/slorber/page/5.html 55.6 kB 0 B
website/build/blog/authors/yangshun.html 69 kB 0 B
website/build/blog/authors/zpao.html 49.5 kB 0 B
website/build/blog/page/2.html 79.5 kB 0 B
website/build/blog/page/3.html 83.9 kB 0 B
website/build/blog/page/4.html 88.4 kB 0 B
website/build/blog/page/5.html 75.5 kB 0 B
website/build/blog/page/6.html 42.6 kB 0 B
website/build/blog/preparing-your-site-for-docusaurus-v3.html 130 kB +1 B (0%)
website/build/blog/releases/2.2.html 52.8 kB +1 B (0%)
website/build/blog/releases/2.3.html 63.4 kB 0 B
website/build/blog/releases/2.4.html 67.1 kB +1 B (0%)
website/build/blog/releases/3.0.html 110 kB +1 B (0%)
website/build/blog/releases/3.1.html 55.5 kB +1 B (0%)
website/build/blog/releases/3.2.html 51.3 kB +1 B (0%)
website/build/blog/releases/3.3.html 58.5 kB +1 B (0%)
website/build/blog/releases/3.4.html 57.7 kB +1 B (0%)
website/build/blog/releases/3.5.html 60.4 kB +1 B (0%)
website/build/blog/releases/3.6.html 79.3 kB +1 B (0%)
website/build/blog/releases/3.7.html 53.1 kB +1 B (0%)
website/build/blog/releases/3.8.html 88.8 kB +6 B (+0.01%)
website/build/blog/releases/3.9.html 63.3 kB +1 B (0%)
website/build/blog/releases/3.10.html 93.8 kB +1 B (0%)
website/build/blog/tags.html 29.1 kB 0 B
website/build/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing.html 127 kB +1 B (0%)
website/build/docs.html 52.8 kB 0 B
website/build/docs/advanced.html 32.1 kB 0 B
website/build/docs/advanced/architecture.html 30.7 kB +4 B (+0.01%)
website/build/docs/advanced/client.html 70.9 kB +1 B (0%)
website/build/docs/advanced/plugins.html 55.9 kB +1 B (0%)
website/build/docs/advanced/routing.html 71.3 kB +1 B (0%)
website/build/docs/advanced/ssg.html 75.9 kB +1 B (0%)
website/build/docs/api/docusaurus-config.html 243 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin.html 51.9 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-html-links.html 37.3 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-untranslated-text.html 36.2 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading.html 37.5 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages.html 41.2 kB +1 B (0%)
website/build/docs/api/misc/@docusaurus/logger.html 39.7 kB +1 B (0%)
website/build/docs/api/misc/create-docusaurus.html 38.7 kB +8 B (+0.02%)
website/build/docs/api/misc/docusaurus-init/index.html 361 B 0 B
website/build/docs/api/plugin-methods.html 63.3 kB +9 B (+0.01%)
website/build/docs/api/plugin-methods/extend-infrastructure.html 59.5 kB 0 B
website/build/docs/api/plugin-methods/i18n-lifecycles.html 58.4 kB +1 B (0%)
website/build/docs/api/plugin-methods/lifecycle-apis.html 162 kB +1 B (0%)
website/build/docs/api/plugin-methods/static-methods.html 45.6 kB +1 B (0%)
website/build/docs/api/plugins.html 33.1 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 60.8 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 189 kB +6 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 196 kB +6 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 76.3 kB +6 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-css-cascade-layers.html 48.1 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 48.7 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 49.8 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 48.6 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 58.4 kB +4 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 119 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-rsdoctor.html 41.2 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 66.7 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-svgr.html 46.3 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 41.6 kB +1 B (0%)
website/build/docs/api/themes.html 30.6 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-classic.html 44.4 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-live-codeblock.html 37.3 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-mermaid.html 36.1 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-search-algolia.html 33.9 kB 0 B
website/build/docs/api/themes/configuration.html 258 kB +1 B (0%)
website/build/docs/blog.html 204 kB +1 B (0%)
website/build/docs/browser-support.html 48.9 kB +6 B (+0.01%)
website/build/docs/category/getting-started.html 28.9 kB 0 B
website/build/docs/category/guides.html 39.5 kB 0 B
website/build/docs/category/miscellaneous.html 28.7 kB 0 B
website/build/docs/cli.html 69 kB 0 B
website/build/docs/configuration.html 93.4 kB 0 B
website/build/docs/create-doc.html 62.5 kB +1 B (0%)
website/build/docs/creating-pages.html 58.2 kB +1 B (0%)
website/build/docs/deployment.html 67.6 kB 0 B
website/build/docs/deployment/github-pages.html 120 kB 0 B
website/build/docs/deployment/netlify.html 39.8 kB 0 B
website/build/docs/deployment/vercel.html 33.8 kB 0 B
website/build/docs/docs-introduction.html 51.6 kB +1 B (0%)
website/build/docs/docs-multi-instance.html 74.9 kB +1 B (0%)
website/build/docs/docusaurus-core.html 228 kB +1 B (0%)
website/build/docs/guides/whats-next.html 33.8 kB 0 B
website/build/docs/i18n/crowdin.html 148 kB +1 B (0%)
website/build/docs/i18n/git.html 80.7 kB +8 B (+0.01%)
website/build/docs/i18n/introduction.html 50.3 kB 0 B
website/build/docs/i18n/tutorial.html 170 kB 0 B
website/build/docs/installation.html 70.7 kB 0 B
website/build/docs/introduction/index.html 280 B 0 B
website/build/docs/markdown-features.html 86.1 kB +2 B (0%)
website/build/docs/markdown-features/admonitions.html 119 kB +1 B (0%)
website/build/docs/markdown-features/assets.html 88.4 kB +1 B (0%)
website/build/docs/markdown-features/code-blocks.html 221 kB +13 B (+0.01%)
website/build/docs/markdown-features/diagrams.html 62 kB 0 B
website/build/docs/markdown-features/head-metadata.html 52.1 kB +1 B (0%)
website/build/docs/markdown-features/links.html 41.9 kB +6 B (+0.01%)
website/build/docs/markdown-features/math-equations.html 93 kB +1 B (0%)
website/build/docs/markdown-features/plugins.html 97 kB +1 B (0%)
website/build/docs/markdown-features/tabs.html 143 kB +1 B (0%)
website/build/docs/markdown-features/toc.html 88.3 kB +1 B (0%)
website/build/docs/migration.html 40.2 kB +1 B (0%)
website/build/docs/migration/v2.html 40.3 kB +1 B (0%)
website/build/docs/migration/v2/automated.html 40.9 kB +1 B (0%)
website/build/docs/migration/v2/manual.html 192 kB +1 B (0%)
website/build/docs/migration/v2/translated-sites.html 52 kB +1 B (0%)
website/build/docs/migration/v2/versioned-sites.html 60.9 kB +1 B (0%)
website/build/docs/migration/v3.html 194 kB +2 B (0%)
website/build/docs/playground.html 32.4 kB 0 B
website/build/docs/resources/index.html 325 B 0 B
website/build/docs/search.html 125 kB +1 B (0%)
website/build/docs/seo.html 89.9 kB 0 B
website/build/docs/sidebar.html 142 kB +1 B (0%)
website/build/docs/sidebar/autogenerated.html 148 kB +1 B (0%)
website/build/docs/sidebar/items.html 177 kB +1 B (0%)
website/build/docs/sidebar/multiple-sidebars.html 63.4 kB +1 B (0%)
website/build/docs/static-assets.html 53 kB +1 B (0%)
website/build/docs/styling-layout.html 142 kB +4 B (0%)
website/build/docs/support/index.html 319 B 0 B
website/build/docs/swizzling.html 113 kB +1 B (0%)
website/build/docs/team/index.html 310 B 0 B
website/build/docs/typescript-support.html 68.2 kB 0 B
website/build/docs/using-plugins.html 107 kB 0 B
website/build/docs/versioning.html 93.6 kB 0 B
website/build/index.html 37.5 kB 0 B

compressed-size-action::DOCUSAURUS_INFRA_SLOWER

slorber and others added 2 commits September 24, 2026 18:15
…s (AI-assisted)

`import text from './file.tsx' with {type: 'text'}` now returns the raw file
content, like the legacy `!!raw-loader!` syntax, for any file type, in both
MDX and JS/TS files.

- Exclude text import attributes from all module rules (including rules added
  by plugins), so that no loader processes them
- Keep import attributes in SWC-transpiled code (`keepImportAttributes`)
- Add dogfooding tests for JS, TS, TSX, JSON, CSS, CSS modules, SVG, MD, MDX,
  YAML and text files, in both MDX and TSX pages
- Replace raw-loader usages in docs by import attributes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…X page rendering JSX/TSX tests (AI-assisted)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@slorber
slorber force-pushed the slorber/import-text-attributes branch from 7c4312c to 4028a9a Compare September 24, 2026 16:15
slorber and others added 2 commits September 24, 2026 16:19
…usaurus rule instead of all rules (AI-assisted)

Third-party plugin rules are no longer modified implicitly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@slorber
slorber force-pushed the slorber/import-text-attributes branch from 7c4312c to 4028a9a Compare September 24, 2026 16:38
slorber and others added 2 commits September 24, 2026 18:39
…variables (AI-assisted)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@slorber
slorber merged commit bd6e5f7 into main Sep 24, 2026
41 of 42 checks passed
@slorber
slorber deleted the slorber/import-text-attributes branch September 24, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Argos Add this label to run UI visual regression tests. See argos.yml GH action. 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.

1 participant