vite-plugin-i18n.ts — astro Source File
Architecture documentation for vite-plugin-i18n.ts, a typescript file in the astro codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 93e2e299_2a6d_4999_3e86_91c97c8fc27f["vite-plugin-i18n.ts"] dd6187d6_53c4_ce90_a1d1_3a0b5e7e7d3f["../../core/errors/errors.js"] 93e2e299_2a6d_4999_3e86_91c97c8fc27f --> dd6187d6_53c4_ce90_a1d1_3a0b5e7e7d3f ef8a1e3f_e350_75a6_b92d_62a8566d8db9["../core/errors/index.js"] 93e2e299_2a6d_4999_3e86_91c97c8fc27f --> ef8a1e3f_e350_75a6_b92d_62a8566d8db9 e9b74c5a_8d34_34a7_e196_5e41b87214aa["../types/astro.js"] 93e2e299_2a6d_4999_3e86_91c97c8fc27f --> e9b74c5a_8d34_34a7_e196_5e41b87214aa 263e522e_1aa5_ebc3_e7d6_45ebc51671f7["vite"] 93e2e299_2a6d_4999_3e86_91c97c8fc27f --> 263e522e_1aa5_ebc3_e7d6_45ebc51671f7 style 93e2e299_2a6d_4999_3e86_91c97c8fc27f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type * as vite from 'vite';
import { AstroError } from '../core/errors/errors.js';
import { AstroErrorData } from '../core/errors/index.js';
import type { AstroSettings } from '../types/astro.js';
const VIRTUAL_MODULE_ID = 'astro:i18n';
type AstroInternationalization = {
settings: AstroSettings;
};
export default function astroInternationalization({
settings,
}: AstroInternationalization): vite.Plugin {
const { i18n } = settings.config;
return {
name: VIRTUAL_MODULE_ID,
enforce: 'pre',
resolveId: {
filter: {
id: new RegExp(`^${VIRTUAL_MODULE_ID}$`),
},
handler() {
if (i18n === undefined) throw new AstroError(AstroErrorData.i18nNotEnabled);
return this.resolve('astro/virtual-modules/i18n.js');
},
},
};
}
Domain
Subdomains
Functions
Dependencies
- ../../core/errors/errors.js
- ../core/errors/index.js
- ../types/astro.js
- vite
Source
Frequently Asked Questions
What does vite-plugin-i18n.ts do?
vite-plugin-i18n.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 vite-plugin-i18n.ts?
vite-plugin-i18n.ts defines 1 function(s): astroInternationalization.
What does vite-plugin-i18n.ts depend on?
vite-plugin-i18n.ts imports 4 module(s): ../../core/errors/errors.js, ../core/errors/index.js, ../types/astro.js, vite.
Where is vite-plugin-i18n.ts in the architecture?
vite-plugin-i18n.ts is located at packages/astro/src/i18n/vite-plugin-i18n.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/i18n).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free