Skip to content

Commit eeaac66

Browse files
committed
Fix readFileSync pwd
1 parent 74fbf18 commit eeaac66

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ global.mpjsPrintStdout = stdout_print;
1818
const mp = require('./lib/micropython.js');
1919
if (typeof window === 'undefined' && typeof importScripts === 'undefined') {
2020
browser = false;
21-
pyjs = require('fs').readFileSync('./js.py');
22-
} else {
21+
pyjs = require('fs').readFileSync('./js.py', {pwd: __dirname});
22+
}
23+
else {
2324
pyjs = require('!raw-loader!./js.py');
2425
}
2526

0 commit comments

Comments
 (0)