Add experimental wasm bindings

Published to npm as objdiff-wasm
This commit is contained in:
2024-08-20 21:40:32 -06:00
parent 8250d26b77
commit 0fccae1049
40 changed files with 4732 additions and 311 deletions

View File

@@ -0,0 +1,15 @@
import {defineConfig} from 'tsup';
import fs from 'node:fs/promises';
export default defineConfig({
entry: ['src/main.ts', 'src/worker.ts'],
clean: true,
dts: true,
format: 'esm',
sourcemap: true,
splitting: false,
target: ['es2022', 'chrome89', 'edge89', 'firefox89', 'safari15', 'node14.8'],
async onSuccess() {
await fs.copyFile('pkg/objdiff_core_bg.wasm', 'dist/objdiff_core_bg.wasm');
}
});