glob-import.spec.ts — vite Source File
Architecture documentation for glob-import.spec.ts, a typescript file in the vite codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 4293fff0_b9e9_2153_27a9_6f4d4e4db930["glob-import.spec.ts"] 51e96894_3556_ed5c_1ede_97d449867adf["node:path"] 4293fff0_b9e9_2153_27a9_6f4d4e4db930 --> 51e96894_3556_ed5c_1ede_97d449867adf a09ff191_7c83_bdcd_30f1_b4e129910bf6["promises"] 4293fff0_b9e9_2153_27a9_6f4d4e4db930 --> a09ff191_7c83_bdcd_30f1_b4e129910bf6 a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"] 4293fff0_b9e9_2153_27a9_6f4d4e4db930 --> a340ba46_b2b7_3048_3bb3_6907a74c8464 d3fd5575_295b_d6be_24dd_62d277645dc9["~utils"] 4293fff0_b9e9_2153_27a9_6f4d4e4db930 --> d3fd5575_295b_d6be_24dd_62d277645dc9 style 4293fff0_b9e9_2153_27a9_6f4d4e4db930 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import path from 'node:path'
import { readdir } from 'node:fs/promises'
import { expect, test } from 'vitest'
import {
addFile,
editFile,
findAssetFile,
isBuild,
page,
removeFile,
} from '~utils'
const filteredResult = {
'./alias.js': {
default: 'hi',
},
'./foo.js': {
msg: 'foo',
},
"./quote'.js": {
msg: 'single-quote',
},
}
const json = {
msg: 'baz',
default: {
msg: 'baz',
},
}
const globWithAlias = {
'/dir/alias.js': {
default: 'hi',
},
}
const allResult = {
// JSON file should be properly transformed
'/dir/alias.js': {
default: 'hi',
},
'/dir/baz.json': json,
'/dir/foo.css': {},
'/dir/foo.js': {
msg: 'foo',
},
'/dir/index.js': isBuild
? {
modules: filteredResult,
globWithAlias,
}
: {
globWithAlias,
modules: filteredResult,
},
'/dir/nested/bar.js': {
modules: {
'../baz.json': json,
},
// ... (254 more lines)
Dependencies
- node:path
- promises
- vitest
- ~utils
Source
Frequently Asked Questions
What does glob-import.spec.ts do?
glob-import.spec.ts is a source file in the vite codebase, written in typescript.
What does glob-import.spec.ts depend on?
glob-import.spec.ts imports 4 module(s): node:path, promises, vitest, ~utils.
Where is glob-import.spec.ts in the architecture?
glob-import.spec.ts is located at playground/glob-import/__tests__/glob-import.spec.ts (directory: playground/glob-import/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free