diff --git a/libsquoosh/src/emscripten-utils.ts b/libsquoosh/src/emscripten-utils.ts index a6481508..c43029f1 100644 --- a/libsquoosh/src/emscripten-utils.ts +++ b/libsquoosh/src/emscripten-utils.ts @@ -19,7 +19,7 @@ export function instantiateEmscriptenWasm( // These will have changed in the bundling process and // we need to inject them here. 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; }, });