saveWorkerBundle() — vite Function Reference
Architecture documentation for the saveWorkerBundle() function in worker.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 0643e557_6a99_c2f8_645a_bc30c5eef1cb["saveWorkerBundle()"] 0d0d0914_5b8b_6a47_5174_e7974dd8084e["WorkerOutputCache"] 0643e557_6a99_c2f8_645a_bc30c5eef1cb -->|defined in| 0d0d0914_5b8b_6a47_5174_e7974dd8084e 75aa4483_7f33_5bdd_19ac_866cac2679e4["bundleWorkerEntry()"] 75aa4483_7f33_5bdd_19ac_866cac2679e4 -->|calls| 0643e557_6a99_c2f8_645a_bc30c5eef1cb 91a8cbc6_85d8_5b82_e23e_148b871783df["saveAsset()"] 0643e557_6a99_c2f8_645a_bc30c5eef1cb -->|calls| 91a8cbc6_85d8_5b82_e23e_148b871783df ca1aacb8_02d9_9952_593d_e56aa5ea822d["generateEntryUrlPlaceholder()"] 0643e557_6a99_c2f8_645a_bc30c5eef1cb -->|calls| ca1aacb8_02d9_9952_593d_e56aa5ea822d style 0643e557_6a99_c2f8_645a_bc30c5eef1cb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/plugins/worker.ts lines 60–81
saveWorkerBundle(
file: string,
watchedFiles: string[],
outputEntryFilename: string,
outputEntryCode: string,
outputAssets: WorkerBundleAsset[],
logger: Logger,
): WorkerBundle {
for (const asset of outputAssets) {
this.saveAsset(asset, logger)
}
const bundle: WorkerBundle = {
entryFilename: outputEntryFilename,
entryCode: outputEntryCode,
entryUrlPlaceholder:
this.generateEntryUrlPlaceholder(outputEntryFilename),
referencedAssets: new Set(outputAssets.map((asset) => asset.fileName)),
watchedFiles,
}
this.bundles.set(file, bundle)
return bundle
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does saveWorkerBundle() do?
saveWorkerBundle() is a function in the vite codebase, defined in packages/vite/src/node/plugins/worker.ts.
Where is saveWorkerBundle() defined?
saveWorkerBundle() is defined in packages/vite/src/node/plugins/worker.ts at line 60.
What does saveWorkerBundle() call?
saveWorkerBundle() calls 2 function(s): generateEntryUrlPlaceholder, saveAsset.
What calls saveWorkerBundle()?
saveWorkerBundle() is called by 1 function(s): bundleWorkerEntry.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free