mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-30 20:33:55 +02:00
Add track-specific conversion options, fix esbuild race condition
This commit is contained in:
@@ -71,13 +71,18 @@ if (cacheDir === undefined) {
|
||||
throw new Error('Cache directory not found.');
|
||||
}
|
||||
|
||||
let i = 0;
|
||||
|
||||
async function buildWorker(workerPath: string, extraConfig: esbuild.BuildOptions) {
|
||||
const scriptNameParts = path.basename(workerPath).split('.');
|
||||
scriptNameParts.pop();
|
||||
scriptNameParts.push(String(i)); // To make sure it doesn't clash with other builds
|
||||
scriptNameParts.push('js');
|
||||
const scriptName = scriptNameParts.join('.');
|
||||
const bundlePath = path.resolve(cacheDir!, scriptName);
|
||||
|
||||
i = (i + 1) % 32;
|
||||
|
||||
if (extraConfig) {
|
||||
delete extraConfig.entryPoints;
|
||||
delete extraConfig.outfile;
|
||||
|
||||
Reference in New Issue
Block a user