13d0ce075e
* Integrate with emnapi * resolve conflict * ignore wasm * generate wasi file * Add wasi test to workflow * Fix wasi template * emnapi new initialize api * Finish test * Purne tsconfig * Generate wasi worker * Fix electron test * Finalize check * Noop adjust_external_memory * Apply cr suggestions
13 lines
251 B
JavaScript
13 lines
251 B
JavaScript
import { createRequire } from 'node:module'
|
|
|
|
const require = createRequire(import.meta.url)
|
|
|
|
let exports
|
|
|
|
if (process.env.WASI_TEST) {
|
|
exports = await import('./index.wasi.mjs')
|
|
} else {
|
|
exports = require('./index.node')
|
|
}
|
|
|
|
export default exports
|