File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ under the licensing terms detailed in LICENSE:
2323* Surma <surma@surma.dev>
2424* Julien Letellier <letellier.julien@gmail.com>
2525* Guido Zuidhof <me@guido.io>
26+ * ncave <777696+ncave@users.noreply.github.com>
2627
2728Portions of this software are derived from third-party works licensed under
2829the following terms:
Original file line number Diff line number Diff line change @@ -316,7 +316,9 @@ function ensureIndexJs() {
316316 fs . writeFileSync ( indexFile , [
317317 "const fs = require(\"fs\");" ,
318318 "const loader = require(\"@assemblyscript/loader\");" ,
319- "module.exports = loader.instantiateSync(fs.readFileSync(__dirname + \"/build/optimized.wasm\"), { /* imports */ })"
319+ "const imports = { /* imports go here */ };" ,
320+ "const wasmModule = loader.instantiateSync(fs.readFileSync(__dirname + \"/build/optimized.wasm\"), imports);" ,
321+ "module.exports = wasmModule.exports;"
320322 ] . join ( "\n" ) + "\n" ) ;
321323 console . log ( colors . green ( " Created: " ) + indexFile ) ;
322324 } else {
You can’t perform that action at this time.
0 commit comments