Merge pull request #1138 from jcao219/fix-windows-path

Use pathify to calculate absolute paths for cross-platform compatibility
This commit is contained in:
Surma
2021-08-31 13:34:28 +01:00
committed by GitHub

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