MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / generateBundle

Function generateBundle

packages/vite/src/workerPlugin.ts:188–210  ·  view source on GitHub ↗
(_, bundle)

Source from the content-addressed store, hash-verified

186 },
187
188 generateBundle(_, bundle) {
189 if (isWorker) {
190 return;
191 }
192 const workerMap = workerCache.get(resolvedConfig)!;
193 for (const asset of workerMap.assets.values()) {
194 const duplicateAsset = bundle[asset.fileName];
195 if (duplicateAsset) {
196 const content = duplicateAsset.type === 'asset' ? duplicateAsset.source : duplicateAsset.code;
197 // don't emit if the file name and the content is same
198 if (isSameContent(content, asset.source)) {
199 return;
200 }
201 }
202
203 this.emitFile({
204 type: 'asset',
205 fileName: asset.fileName,
206 source: asset.source
207 });
208 }
209 workerMap.assets.clear();
210 }
211 };
212}

Callers

nothing calls this directly

Calls 4

isSameContentFunction · 0.90
getMethod · 0.65
clearMethod · 0.65
valuesMethod · 0.45

Tested by

no test coverage detected