Home / File/ astro.config.mjs — astro Source File

astro.config.mjs — astro Source File

Architecture documentation for astro.config.mjs, a javascript file in the astro codebase. 1 imports, 0 dependents.

File javascript 1 imports

Entity Profile

Dependency Diagram

graph LR
  00a02f7c_f714_fdf1_d1f2_310578fdbe1c["astro.config.mjs"]
  3b10c06c_a805_be1f_3a3d_1f00ea858ef5["config"]
  00a02f7c_f714_fdf1_d1f2_310578fdbe1c --> 3b10c06c_a805_be1f_3a3d_1f00ea858ef5
  style 00a02f7c_f714_fdf1_d1f2_310578fdbe1c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { defineConfig } from 'astro/config';

const MODULE_ID = 'virtual:test';
const RESOLVED_MODULE_ID = '\0virtual:test';

export default defineConfig({
	integrations: [
		{
			name: 'astro-test-invalid-transform',
			hooks: {
				'astro:config:setup': ({ updateConfig }) => {
					updateConfig({
						vite: {
							plugins: [
								// -----------------------------------
								{
									name: 'vite-test-invalid-transform',
									resolveId: {
										filter: {
											id: new RegExp(`^${MODULE_ID}$`),
										},
										handler() {
											// Astro tries to transform this import because the query params can end with '.astro'
											return `${RESOLVED_MODULE_ID}?importer=index.astro`;
										},
									},
									load: {
										filter: {
											id: new RegExp(`^${RESOLVED_MODULE_ID}`),
										},
										handler() {
											return `export default 'true';`;
										},
									},
								},
								// -----------------------------------
							],
						},
					});
				},
			},
		},
	],
});

Dependencies

  • config

Frequently Asked Questions

What does astro.config.mjs do?
astro.config.mjs is a source file in the astro codebase, written in javascript.
What does astro.config.mjs depend on?
astro.config.mjs imports 1 module(s): config.
Where is astro.config.mjs in the architecture?
astro.config.mjs is located at packages/astro/test/fixtures/extension-matching/astro.config.mjs (directory: packages/astro/test/fixtures/extension-matching).

Analyze Your Own Codebase

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

Try Supermodel Free