workerFileToUrl() — vite Function Reference
Architecture documentation for the workerFileToUrl() function in worker.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 2263fc73_3545_6a6d_f020_363141e760f3["workerFileToUrl()"] 971bf58d_477c_c4d8_0c3b_735e572044c4["worker.ts"] 2263fc73_3545_6a6d_f020_363141e760f3 -->|defined in| 971bf58d_477c_c4d8_0c3b_735e572044c4 1a156a4f_5015_f60f_3a54_6eb2168861ca["webWorkerPlugin()"] 1a156a4f_5015_f60f_3a54_6eb2168861ca -->|calls| 2263fc73_3545_6a6d_f020_363141e760f3 cc381763_acbd_6aeb_4970_907e43d5b95f["workerImportMetaUrlPlugin()"] cc381763_acbd_6aeb_4970_907e43d5b95f -->|calls| 2263fc73_3545_6a6d_f020_363141e760f3 51afdf58_3045_64b1_cf5b_929b1091e877["get()"] 2263fc73_3545_6a6d_f020_363141e760f3 -->|calls| 51afdf58_3045_64b1_cf5b_929b1091e877 75aa4483_7f33_5bdd_19ac_866cac2679e4["bundleWorkerEntry()"] 2263fc73_3545_6a6d_f020_363141e760f3 -->|calls| 75aa4483_7f33_5bdd_19ac_866cac2679e4 91a8cbc6_85d8_5b82_e23e_148b871783df["saveAsset()"] 2263fc73_3545_6a6d_f020_363141e760f3 -->|calls| 91a8cbc6_85d8_5b82_e23e_148b871783df style 2263fc73_3545_6a6d_f020_363141e760f3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/plugins/worker.ts lines 296–312
export async function workerFileToUrl(
config: ResolvedConfig,
id: string,
): Promise<WorkerBundle> {
const workerOutput = workerOutputCaches.get(config.mainConfig || config)!
const bundle = await bundleWorkerEntry(config, id)
workerOutput.saveAsset(
{
fileName: bundle.entryFilename,
originalFileName: null,
originalFileNames: [],
source: bundle.entryCode,
},
config.logger,
)
return bundle
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does workerFileToUrl() do?
workerFileToUrl() is a function in the vite codebase, defined in packages/vite/src/node/plugins/worker.ts.
Where is workerFileToUrl() defined?
workerFileToUrl() is defined in packages/vite/src/node/plugins/worker.ts at line 296.
What does workerFileToUrl() call?
workerFileToUrl() calls 3 function(s): bundleWorkerEntry, get, saveAsset.
What calls workerFileToUrl()?
workerFileToUrl() is called by 2 function(s): webWorkerPlugin, workerImportMetaUrlPlugin.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free