diff --git a/NOTICE b/NOTICE index 2d41975541..a260a70483 100644 --- a/NOTICE +++ b/NOTICE @@ -23,6 +23,7 @@ under the licensing terms detailed in LICENSE: * Surma * Julien Letellier * Guido Zuidhof +* ncave <777696+ncave@users.noreply.github.com> Portions of this software are derived from third-party works licensed under the following terms: diff --git a/bin/asinit b/bin/asinit index 930cdfbb98..7752a8d531 100755 --- a/bin/asinit +++ b/bin/asinit @@ -316,7 +316,9 @@ function ensureIndexJs() { fs.writeFileSync(indexFile, [ "const fs = require(\"fs\");", "const loader = require(\"@assemblyscript/loader\");", - "module.exports = loader.instantiateSync(fs.readFileSync(__dirname + \"/build/optimized.wasm\"), { /* imports */ })" + "const imports = { /* imports go here */ };", + "const wasmModule = loader.instantiateSync(fs.readFileSync(__dirname + \"/build/optimized.wasm\"), imports);", + "module.exports = wasmModule.exports;" ].join("\n") + "\n"); console.log(colors.green(" Created: ") + indexFile); } else {