[wasm] build: fix detection for environment

This commit is contained in:
鲁树人
2024-09-14 20:09:38 +01:00
parent 2cca297bcc
commit 59fafa9e2a
2 changed files with 9 additions and 11 deletions

View File

@@ -92,9 +92,6 @@ async function main() {
// Ask rollup to build bundles.
await run(['pnpm', 'build:bundle']);
await run(['pnpm', 'exec', 'prettier', '--ignore-path', '', '-w', 'dist/loader.d.ts']);
await replaceFileByRegex(path.join(wasmDistDir, 'loader.mjs'), [
['fetch(filepath)', 'fetch(new URL(filepath, import.meta.url))'],
]);
}
main()