Home / File/ index.ts — vite Source File

index.ts — vite Source File

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

Entity Profile

Dependency Diagram

graph LR
  6e5b4f63_17b2_fcf9_1620_4b61c8591a34["index.ts"]
  998df3e2_b2a5_d1bd_a5e0_213d71e24edf["../../../../../../types/importMeta"]
  6e5b4f63_17b2_fcf9_1620_4b61c8591a34 --> 998df3e2_b2a5_d1bd_a5e0_213d71e24edf
  style 6e5b4f63_17b2_fcf9_1620_4b61c8591a34 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// NOTE: `#types/importMeta` does not work as `src/node/__tests__/package.json` shadows the root
// `package.json` and does not declare the subpath import.
import '../../../../../../types/importMeta'

export interface ModuleType {
  name: string
}

export const basic = import.meta.glob<ModuleType>('./modules/*.ts')
// prettier-ignore
export const basicWithObjectKeys = Object.keys(import.meta.glob<ModuleType>('./modules/*.ts'))
// prettier-ignore
export const basicWithObjectValues = Object.values(import.meta.glob<ModuleType>('./modules/*.ts'))

export const basicEager = import.meta.glob<ModuleType>('./modules/*.ts', {
  eager: true,
})
export const basicEagerWithObjectKeys = Object.keys(
  import.meta.glob<ModuleType>('./modules/*.ts', {
    eager: true,
  }),
)
export const basicEagerWithObjectValues = Object.values(
  import.meta.glob<ModuleType>('./modules/*.ts', {
    eager: true,
  }),
)

export const ignore = import.meta.glob(['./modules/*.ts', '!**/index.ts'])
export const ignoreWithObjectKeys = Object.keys(
  import.meta.glob(['./modules/*.ts', '!**/index.ts']),
)
export const ignoreWithObjectValues = Object.values(
  import.meta.glob(['./modules/*.ts', '!**/index.ts']),
)

export const namedEager = import.meta.glob<string>('./modules/*.ts', {
  eager: true,
  import: 'name',
})
export const namedEagerWithObjectKeys = Object.keys(
  import.meta.glob<string>('./modules/*.ts', {
    eager: true,
    import: 'name',
  }),
)
export const namedEagerWithObjectValues = Object.values(
  import.meta.glob<string>('./modules/*.ts', {
    eager: true,
    import: 'name',
  }),
)

export const namedDefault = import.meta.glob<string>('./modules/*.ts', {
  import: 'default',
})
export const namedDefaultWithObjectKeys = Object.keys(
  import.meta.glob<string>('./modules/*.ts', {
    import: 'default',
  }),
// ... (67 more lines)

Domain

Types

Dependencies

  • ../../../../../../types/importMeta

Frequently Asked Questions

What does index.ts do?
index.ts is a source file in the vite codebase, written in typescript. It belongs to the ViteCore domain.
What does index.ts depend on?
index.ts imports 1 module(s): ../../../../../../types/importMeta.
Where is index.ts in the architecture?
index.ts is located at packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts (domain: ViteCore, directory: packages/vite/src/node/__tests__/plugins/importGlob/fixture-a).

Analyze Your Own Codebase

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

Try Supermodel Free