( config: ResolvedConfig, id: string, )
| 308 | export const workerAssetUrlRE: RegExp = /__VITE_WORKER_ASSET__([a-z\d]{8})__/g |
| 309 | |
| 310 | export async function workerFileToUrl( |
| 311 | config: ResolvedConfig, |
| 312 | id: string, |
| 313 | ): Promise<WorkerBundle> { |
| 314 | const workerOutput = workerOutputCaches.get(config.mainConfig || config)! |
| 315 | const bundle = await bundleWorkerEntry(config, id) |
| 316 | workerOutput.saveAsset( |
| 317 | { |
| 318 | fileName: bundle.entryFilename, |
| 319 | originalFileName: null, |
| 320 | originalFileNames: [], |
| 321 | source: bundle.entryCode, |
| 322 | }, |
| 323 | config.logger, |
| 324 | ) |
| 325 | return bundle |
| 326 | } |
| 327 | |
| 328 | export function webWorkerPostPlugin(_config: ResolvedConfig): Plugin { |
| 329 | return { |
no test coverage detected