diff --git a/ports/webassembly/wrapper.js b/ports/webassembly/wrapper.js index 24f4f8a72c..981ade5d80 100644 --- a/ports/webassembly/wrapper.js +++ b/ports/webassembly/wrapper.js @@ -56,6 +56,12 @@ var mainProgram = function() repl = false;; } } + + if (process.stdin.isTTY === false) { + contents = fs.readFileSync(0, 'utf8'); + repl = 0; + } + mp_js_init(heap_size); if (repl) {