Use pathify to calculate absolute paths for cross-platform compatibility

This commit is contained in:
Jimmy Cao
2021-08-30 13:37:17 -07:00
parent 023304803f
commit 92f52319da

View File

@@ -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;
}, },
}); });