[wasm] build: fix build with node/browser

This commit is contained in:
鲁树人
2024-09-14 19:55:53 +01:00
parent 29c5be137a
commit d385630499
5 changed files with 36 additions and 5 deletions

8
um_wasm_loader/test.cjs Normal file
View File

@@ -0,0 +1,8 @@
const { NCMFile, ready } = require('./dist/loader.js');
ready.then(() => {
const ncm = new NCMFile();
let n = ncm.open(new Uint8Array([]));
console.assert(n !== 0, 'n should not be 0', { n });
console.log('cjs test ok');
});