mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-08 04:29:54 +00:00
[wasm] build: fix build with node/browser
This commit is contained in:
8
um_wasm_loader/test.cjs
Normal file
8
um_wasm_loader/test.cjs
Normal 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');
|
||||
});
|
||||
Reference in New Issue
Block a user