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. 2 imports, 0 dependents.

File javascript 2 imports

Entity Profile

Dependency Diagram

graph LR
  89630be8_3ab2_4d45_f1e0_a94b5731cdf7["astro.config.mjs"]
  d9a92db9_c95e_9165_13ac_24b3d859d946["node:url"]
  89630be8_3ab2_4d45_f1e0_a94b5731cdf7 --> d9a92db9_c95e_9165_13ac_24b3d859d946
  3b10c06c_a805_be1f_3a3d_1f00ea858ef5["config"]
  89630be8_3ab2_4d45_f1e0_a94b5731cdf7 --> 3b10c06c_a805_be1f_3a3d_1f00ea858ef5
  style 89630be8_3ab2_4d45_f1e0_a94b5731cdf7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { fileURLToPath } from 'node:url';
import { defineConfig } from 'astro/config';

export default defineConfig({
	integrations: [
		{
			name: 'my-middleware',
			hooks: {
				'astro:config:setup':({ addMiddleware }) => {
					addMiddleware({
						entrypoint: fileURLToPath(new URL('./integration-middleware-pre.js', import.meta.url)),
						order: 'pre'
					});

					addMiddleware({
						entrypoint: fileURLToPath(new URL('./integration-middleware-post.js', import.meta.url)),
						order: 'post'
					});
				}
			}
		}
	]
});

Dependencies

  • config
  • node:url

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 2 module(s): config, node:url.
Where is astro.config.mjs in the architecture?
astro.config.mjs is located at packages/astro/test/fixtures/middleware space/astro.config.mjs (directory: packages/astro/test/fixtures/middleware space).

Analyze Your Own Codebase

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

Try Supermodel Free