(fileName: string, workerCache: WorkerCache)
| 78 | |
| 79 | // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/plugins/worker.ts#L149 |
| 80 | function encodeWorkerAssetFileName(fileName: string, workerCache: WorkerCache): string { |
| 81 | const { fileNameHash } = workerCache; |
| 82 | const hash = getHash(fileName); |
| 83 | if (!fileNameHash.get(hash)) { |
| 84 | fileNameHash.set(hash, fileName); |
| 85 | } |
| 86 | return `${WORKER_ASSET_ID}${hash}__`; |
| 87 | } |
| 88 | |
| 89 | async function bundleWorkerEntry(config: ResolvedConfig, id: string): Promise<BundledWorkerChunk> { |
| 90 | const input = cleanUrl(id); |
no test coverage detected