Home / File/ index.ts — astro Source File

index.ts — astro Source File

Architecture documentation for index.ts, a typescript file in the astro codebase. 3 imports, 0 dependents.

File typescript CoreAstro RenderingEngine 3 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  b9070660_fa9b_4e94_6ef5_8fc70d039609["index.ts"]
  7216d952_4e4a_2d18_a85b_74b4ace79e2b["../core/constants.js"]
  b9070660_fa9b_4e94_6ef5_8fc70d039609 --> 7216d952_4e4a_2d18_a85b_74b4ace79e2b
  5ca9157e_ea28_a7b7_e597_4adeea18153b["../core/errors/overlay.js"]
  b9070660_fa9b_4e94_6ef5_8fc70d039609 --> 5ca9157e_ea28_a7b7_e597_4adeea18153b
  263e522e_1aa5_ebc3_e7d6_45ebc51671f7["vite"]
  b9070660_fa9b_4e94_6ef5_8fc70d039609 --> 263e522e_1aa5_ebc3_e7d6_45ebc51671f7
  style b9070660_fa9b_4e94_6ef5_8fc70d039609 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { Plugin } from 'vite';
import { ASTRO_VITE_ENVIRONMENT_NAMES } from '../core/constants.js';
import { patchOverlay } from '../core/errors/overlay.js';

export function vitePluginAstroServerClient(): Plugin {
	return {
		name: 'astro:server-client',
		applyToEnvironment(environment) {
			return environment.name === ASTRO_VITE_ENVIRONMENT_NAMES.client;
		},
		transform: {
			filter: {
				id: /vite\/dist\/client\/client\.mjs/,
			},
			handler(code) {
				// Replace the Vite overlay with ours
				return patchOverlay(code);
			},
		},
	};
}

Domain

Subdomains

Dependencies

  • ../core/constants.js
  • ../core/errors/overlay.js
  • vite

Frequently Asked Questions

What does index.ts do?
index.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What functions are defined in index.ts?
index.ts defines 1 function(s): vitePluginAstroServerClient.
What does index.ts depend on?
index.ts imports 3 module(s): ../core/constants.js, ../core/errors/overlay.js, vite.
Where is index.ts in the architecture?
index.ts is located at packages/astro/src/vite-plugin-overlay/index.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/vite-plugin-overlay).

Analyze Your Own Codebase

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

Try Supermodel Free