Home / Function/ withBuild() — vite Function Reference

withBuild() — vite Function Reference

Architecture documentation for the withBuild() function in css-dynamic-import.spec.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  cc69cf35_423f_d4ec_d7ee_891ab5f0a3cf["withBuild()"]
  dd71c169_a6c5_edad_b5a0_65b1cfb5183c["css-dynamic-import.spec.ts"]
  cc69cf35_423f_d4ec_d7ee_891ab5f0a3cf -->|defined in| dd71c169_a6c5_edad_b5a0_65b1cfb5183c
  c3171398_e4f5_405b_10b1_82029ca7a566["getConfig()"]
  cc69cf35_423f_d4ec_d7ee_891ab5f0a3cf -->|calls| c3171398_e4f5_405b_10b1_82029ca7a566
  style cc69cf35_423f_d4ec_d7ee_891ab5f0a3cf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

playground/css-dynamic-import/__tests__/css-dynamic-import.spec.ts lines 20–31

async function withBuild(base: string, fn: () => Promise<void>) {
  const config = getConfig(base)
  await build(config)
  const server = await preview(config)

  try {
    await page.goto(server.resolvedUrls.local[0])
    await fn()
  } finally {
    server.httpServer.close()
  }
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does withBuild() do?
withBuild() is a function in the vite codebase, defined in playground/css-dynamic-import/__tests__/css-dynamic-import.spec.ts.
Where is withBuild() defined?
withBuild() is defined in playground/css-dynamic-import/__tests__/css-dynamic-import.spec.ts at line 20.
What does withBuild() call?
withBuild() calls 1 function(s): getConfig.

Analyze Your Own Codebase

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

Try Supermodel Free