porffor 0.17.0-589ace465 → 0.17.0-8677c8b6b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/wrap.js +1 -1
- package/package.json +1 -1
- package/runner/index.js +1 -1
package/compiler/wrap.js
CHANGED
@@ -140,7 +140,7 @@ export default (source, flags = [ 'module' ], customImports = {}, print = str =>
|
|
140
140
|
|
141
141
|
globalThis.porfDebugInfo = { funcs, globals };
|
142
142
|
|
143
|
-
|
143
|
+
if (process.argv[1].includes('/runner') && source.includes?.('export ')) flags.push('module');
|
144
144
|
|
145
145
|
// fs.writeFileSync('out.wasm', Buffer.from(wasm));
|
146
146
|
|
package/package.json
CHANGED
package/runner/index.js
CHANGED
@@ -130,7 +130,7 @@ const print = str => {
|
|
130
130
|
let runStart;
|
131
131
|
try {
|
132
132
|
if (process.argv.includes('-b')) {
|
133
|
-
const { wasm, exports } = compile(source, process.argv.includes('--module') ? [ 'module' ] : [], {}, print);
|
133
|
+
const { wasm, exports } = await compile(source, process.argv.includes('--module') ? [ 'module' ] : [], {}, print);
|
134
134
|
|
135
135
|
runStart = performance.now();
|
136
136
|
if (!process.argv.includes('--no-run')) exports.main();
|