Home / Function/ injectUnderscoreFragmentImport() — astro Function Reference

injectUnderscoreFragmentImport() — astro Function Reference

Architecture documentation for the injectUnderscoreFragmentImport() function in vite-plugin-mdx-postprocess.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  5fd6f1f4_38c0_593a_0f60_5635d6ac94c7["injectUnderscoreFragmentImport()"]
  1d16286a_a608_ecf0_1939_33200eaee4a0["vite-plugin-mdx-postprocess.ts"]
  5fd6f1f4_38c0_593a_0f60_5635d6ac94c7 -->|defined in| 1d16286a_a608_ecf0_1939_33200eaee4a0
  41ea6fc9_a90c_0a26_da48_58217361f433["vitePluginMdxPostprocess()"]
  41ea6fc9_a90c_0a26_da48_58217361f433 -->|calls| 5fd6f1f4_38c0_593a_0f60_5635d6ac94c7
  21a3b591_b826_af88_df86_c38ee83330f7["isSpecifierImported()"]
  5fd6f1f4_38c0_593a_0f60_5635d6ac94c7 -->|calls| 21a3b591_b826_af88_df86_c38ee83330f7
  style 5fd6f1f4_38c0_593a_0f60_5635d6ac94c7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/mdx/src/vite-plugin-mdx-postprocess.ts lines 48–53

function injectUnderscoreFragmentImport(code: string, imports: readonly ImportSpecifier[]) {
	if (!isSpecifierImported(code, imports, underscoreFragmentImportRegex, 'astro/jsx-runtime')) {
		code += `\nimport { Fragment as _Fragment } from 'astro/jsx-runtime';`;
	}
	return code;
}

Domain

Subdomains

Frequently Asked Questions

What does injectUnderscoreFragmentImport() do?
injectUnderscoreFragmentImport() is a function in the astro codebase, defined in packages/integrations/mdx/src/vite-plugin-mdx-postprocess.ts.
Where is injectUnderscoreFragmentImport() defined?
injectUnderscoreFragmentImport() is defined in packages/integrations/mdx/src/vite-plugin-mdx-postprocess.ts at line 48.
What does injectUnderscoreFragmentImport() call?
injectUnderscoreFragmentImport() calls 1 function(s): isSpecifierImported.
What calls injectUnderscoreFragmentImport()?
injectUnderscoreFragmentImport() is called by 1 function(s): vitePluginMdxPostprocess.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free