Home / Function/ loadData() — vite Function Reference

loadData() — vite Function Reference

Architecture documentation for the loadData() function in acknowledgements.data.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  a724534b_0754_d646_5276_8ce434497095["loadData()"]
  217bc23a_2c54_8ca5_016d_7cb941ca23b7["acknowledgements.data.ts"]
  a724534b_0754_d646_5276_8ce434497095 -->|defined in| 217bc23a_2c54_8ca5_016d_7cb941ca23b7
  cf655ecc_f7b5_0d73_872d_c31d651b8beb["default.load()"]
  cf655ecc_f7b5_0d73_872d_c31d651b8beb -->|calls| a724534b_0754_d646_5276_8ce434497095
  458fc751_3f15_a292_18f6_a3629ce7fe5d["parseBundledDependenciesFromLicense()"]
  a724534b_0754_d646_5276_8ce434497095 -->|calls| 458fc751_3f15_a292_18f6_a3629ce7fe5d
  c7fe79cf_90ff_1266_2969_1631fc185db0["readPackageInfo()"]
  a724534b_0754_d646_5276_8ce434497095 -->|calls| c7fe79cf_90ff_1266_2969_1631fc185db0
  d7069f79_7d30_d2c5_f382_fb13a52cd6f7["groupByAuthor()"]
  a724534b_0754_d646_5276_8ce434497095 -->|calls| d7069f79_7d30_d2c5_f382_fb13a52cd6f7
  style a724534b_0754_d646_5276_8ce434497095 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

docs/_data/acknowledgements.data.ts lines 266–308

function loadData(): AcknowledgementsData {
  const licensePath = path.join(vitePackageDir, 'LICENSE.md')
  const nodeModulesDir = path.join(vitePackageDir, 'node_modules')
  const rootNodeModulesDir = path.resolve(
    import.meta.dirname,
    '../../node_modules',
  )

  const bundledDepNames = parseBundledDependenciesFromLicense(licensePath)
  const bundledDependencies = bundledDepNames
    .map(
      (name) =>
        readPackageInfo(name, nodeModulesDir) ||
        readPackageInfo(name, rootNodeModulesDir),
    )
    .filter((dep) => dep != null)
    .sort((a, b) => a.name.localeCompare(b.name))

  const devTools = devToolNames
    .map((name) => readPackageInfo(name, rootNodeModulesDir))
    .filter((dep) => dep != null)
    .sort((a, b) => a.name.localeCompare(b.name))

  const notableDeps = notableDependencies
    .map(
      (name) =>
        readPackageInfo(name, nodeModulesDir) ||
        readPackageInfo(name, rootNodeModulesDir),
    )
    .filter((dep) => dep != null)

  const nonNotableDeps = bundledDependencies.filter(
    (d) => !notableDependencies.includes(d.name),
  )

  return {
    bundledDependencies,
    notableDependencies: notableDeps,
    devTools,
    pastNotableDependencies,
    authors: groupByAuthor(nonNotableDeps),
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does loadData() do?
loadData() is a function in the vite codebase, defined in docs/_data/acknowledgements.data.ts.
Where is loadData() defined?
loadData() is defined in docs/_data/acknowledgements.data.ts at line 266.
What does loadData() call?
loadData() calls 3 function(s): groupByAuthor, parseBundledDependenciesFromLicense, readPackageInfo.
What calls loadData()?
loadData() is called by 1 function(s): default.load.

Analyze Your Own Codebase

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

Try Supermodel Free