Home / Function/ build() — vite Function Reference

build() — vite Function Reference

Architecture documentation for the build() function in build.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  bbded320_f805_2b6e_3109_088d194024a2["build()"]
  45981d85_cbdd_e969_8c88_c17072ea0eda["build.ts"]
  bbded320_f805_2b6e_3109_088d194024a2 -->|defined in| 45981d85_cbdd_e969_8c88_c17072ea0eda
  7334fb40_099e_4ae2_47cc_9569925a344a["buildWithPlugin()"]
  7334fb40_099e_4ae2_47cc_9569925a344a -->|calls| bbded320_f805_2b6e_3109_088d194024a2
  9b73feeb_5714_f219_6b88_3cc70c29cfe6["buildProject()"]
  9b73feeb_5714_f219_6b88_3cc70c29cfe6 -->|calls| bbded320_f805_2b6e_3109_088d194024a2
  8fb400c0_eabf_b57a_2905_d2afc7644da6["createBuilder()"]
  8fb400c0_eabf_b57a_2905_d2afc7644da6 -->|calls| bbded320_f805_2b6e_3109_088d194024a2
  157cb972_609e_022e_1ec5_3ed6f7e4f45c["cssPlugin()"]
  157cb972_609e_022e_1ec5_3ed6f7e4f45c -->|calls| bbded320_f805_2b6e_3109_088d194024a2
  cd131d16_e223_ab79_1b7c_8ea449ae51a2["cssPostPlugin()"]
  cd131d16_e223_ab79_1b7c_8ea449ae51a2 -->|calls| bbded320_f805_2b6e_3109_088d194024a2
  8fb400c0_eabf_b57a_2905_d2afc7644da6["createBuilder()"]
  bbded320_f805_2b6e_3109_088d194024a2 -->|calls| 8fb400c0_eabf_b57a_2905_d2afc7644da6
  style bbded320_f805_2b6e_3109_088d194024a2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/build.ts lines 540–547

export async function build(
  inlineConfig: InlineConfig = {},
): Promise<RolldownOutput | RolldownOutput[] | RolldownWatcher> {
  const builder = await createBuilder(inlineConfig, true)
  const environment = Object.values(builder.environments)[0]
  if (!environment) throw new Error('No environment found')
  return builder.build(environment)
}

Domain

Subdomains

Frequently Asked Questions

What does build() do?
build() is a function in the vite codebase, defined in packages/vite/src/node/build.ts.
Where is build() defined?
build() is defined in packages/vite/src/node/build.ts at line 540.
What does build() call?
build() calls 1 function(s): createBuilder.
What calls build()?
build() is called by 5 function(s): buildProject, buildWithPlugin, createBuilder, cssPlugin, cssPostPlugin.

Analyze Your Own Codebase

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

Try Supermodel Free