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:
23
23
* Surma <surma@surma.dev>
24
24
* Julien Letellier <letellier.julien@gmail.com>
25
25
* Guido Zuidhof <me@guido.io>
26
+ * ncave <777696+ncave@users.noreply.github.com>
26
27
27
28
Portions of this software are derived from third-party works licensed under
28
29
the following terms:
Original file line number Diff line number Diff line change @@ -316,7 +316,9 @@ function ensureIndexJs() {
316
316
fs . writeFileSync ( indexFile , [
317
317
"const fs = require(\"fs\");" ,
318
318
"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;"
320
322
] . join ( "\n" ) + "\n" ) ;
321
323
console . log ( colors . green ( " Created: " ) + indexFile ) ;
322
324
} else {
You can’t perform that action at this time.
0 commit comments