config.spec.ts — vite Source File
Architecture documentation for config.spec.ts, a typescript file in the vite codebase. 18 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 58760808_888f_c5b0_2f67_88fd0b1efc86["config.spec.ts"] 7da774f9_eca5_d54e_6e01_6bee7d460a2b["config.ts"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 7da774f9_eca5_d54e_6e01_6bee7d460a2b fe7f5962_2950_2a13_2dfe_8f14ff3bb0d8["UserConfig"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> fe7f5962_2950_2a13_2dfe_8f14ff3bb0d8 650c6af9_c8d9_b67f_9149_9fa38a8587ab["UserConfig"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 650c6af9_c8d9_b67f_9149_9fa38a8587ab 6ae0ce30_c53d_ba4c_265f_09e5705cc0b4["UserConfigExport"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 6ae0ce30_c53d_ba4c_265f_09e5705cc0b4 7c04af49_085c_b514_6df6_5be262b4ed8c["defineConfig"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 7c04af49_085c_b514_6df6_5be262b4ed8c 53f0a505_9626_e709_c92b_e7f00c6e0bd7["loadConfigFromFile"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 53f0a505_9626_e709_c92b_e7f00c6e0bd7 58c4a210_68fe_1b4d_ed49_d59203f97ef1["resolveConfig"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 58c4a210_68fe_1b4d_ed49_d59203f97ef1 7fa76fc1_cb1b_cf98_0900_1217276f6616["env.ts"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 7fa76fc1_cb1b_cf98_0900_1217276f6616 3683cd63_6033_ad37_3392_8ecf602fefea["resolveEnvPrefix"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 3683cd63_6033_ad37_3392_8ecf602fefea 031bc221_67a8_c579_f2bf_bb30a08beeb2["utils.ts"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 031bc221_67a8_c579_f2bf_bb30a08beeb2 657661b0_3b17_9113_8464_fda5dfafd706["mergeConfig"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 657661b0_3b17_9113_8464_fda5dfafd706 eca93de5_04d5_dda0_7ae6_2ceb5379ea81["logger.ts"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> eca93de5_04d5_dda0_7ae6_2ceb5379ea81 04e3b119_ae40_14a9_42ce_3951d83fc60d["createLogger"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 04e3b119_ae40_14a9_42ce_3951d83fc60d 946bdba3_227b_3fc0_1b4c_ddbdb281f454["node:http"] 58760808_888f_c5b0_2f67_88fd0b1efc86 --> 946bdba3_227b_3fc0_1b4c_ddbdb281f454 style 58760808_888f_c5b0_2f67_88fd0b1efc86 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import http from 'node:http'
import path from 'node:path'
import fs from 'node:fs'
import { afterEach, describe, expect, test, vi } from 'vitest'
import type { InlineConfig, PluginOption } from '..'
import type { UserConfig, UserConfigExport } from '../config'
import { defineConfig, loadConfigFromFile, resolveConfig } from '../config'
import { resolveEnvPrefix } from '../env'
import { mergeConfig } from '../utils'
import { createLogger } from '../logger'
describe('mergeConfig', () => {
test('handles configs with different alias schemas', () => {
const baseConfig = defineConfig({
resolve: {
alias: [
{
find: 'foo',
replacement: 'foo-value',
},
],
},
})
const newConfig = defineConfig({
resolve: {
alias: {
bar: 'bar-value',
baz: 'baz-value',
},
},
})
const mergedConfig: UserConfigExport = {
resolve: {
alias: [
{
find: 'bar',
replacement: 'bar-value',
},
{
find: 'baz',
replacement: 'baz-value',
},
{
find: 'foo',
replacement: 'foo-value',
},
],
},
}
expect(mergeConfig(baseConfig, newConfig)).toEqual(mergedConfig)
})
test('keep object alias schema', () => {
const baseConfig = {
resolve: {
alias: {
bar: 'bar-value',
// ... (1164 more lines)
Domain
Dependencies
Source
Frequently Asked Questions
What does config.spec.ts do?
config.spec.ts is a source file in the vite codebase, written in typescript. It belongs to the ViteCore domain.
What does config.spec.ts depend on?
config.spec.ts imports 18 module(s): .., UserConfig, UserConfig, UserConfigExport, config.ts, createLogger, defineConfig, env.ts, and 10 more.
Where is config.spec.ts in the architecture?
config.spec.ts is located at packages/vite/src/node/__tests__/config.spec.ts (domain: ViteCore, directory: packages/vite/src/node/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free