vite/playground/wasm/worker.js
2022-08-01 14:39:26 +09:00

5 lines
119 B
JavaScript

import init from './add.wasm?init'
init().then(({ exports }) => {
self.postMessage({ result: exports.add(1, 2) })
})