Home / Function/ dynamicImport.loader() — astro Function Reference

dynamicImport.loader() — astro Function Reference

Architecture documentation for the dynamicImport.loader() function in content.config.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  4a75b6f6_8cd4_84cd_26f1_8fd8d8c6233f["dynamicImport.loader()"]
  6701f32e_5f47_2ad2_aaa6_e72b4a79cbcc["content.config.ts"]
  4a75b6f6_8cd4_84cd_26f1_8fd8d8c6233f -->|defined in| 6701f32e_5f47_2ad2_aaa6_e72b4a79cbcc
  style 4a75b6f6_8cd4_84cd_26f1_8fd8d8c6233f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/test/fixtures/content-layer/src/content.config.ts lines 370–374

	loader: async () => {
		// This dynamic import would fail with "Vite module runner has been closed" before the fix
		const data = await import('./data/cats.json');
		return data.default;
	},

Subdomains

Frequently Asked Questions

What does dynamicImport.loader() do?
dynamicImport.loader() is a function in the astro codebase, defined in packages/astro/test/fixtures/content-layer/src/content.config.ts.
Where is dynamicImport.loader() defined?
dynamicImport.loader() is defined in packages/astro/test/fixtures/content-layer/src/content.config.ts at line 370.

Analyze Your Own Codebase

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

Try Supermodel Free