mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
Use pathify to calculate absolute paths for cross-platform compatibility
This commit is contained in:
@@ -19,7 +19,7 @@ export function instantiateEmscriptenWasm<T extends EmscriptenWasm.Module>(
|
|||||||
// These will have changed in the bundling process and
|
// These will have changed in the bundling process and
|
||||||
// we need to inject them here.
|
// we need to inject them here.
|
||||||
if (requestPath.endsWith('.wasm')) return pathify(path);
|
if (requestPath.endsWith('.wasm')) return pathify(path);
|
||||||
if (requestPath.endsWith('.worker.js')) return new URL(workerJS).pathname;
|
if (requestPath.endsWith('.worker.js')) return pathify(workerJS);
|
||||||
return requestPath;
|
return requestPath;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user