File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ global.mpjsPrintStdout = stdout_print;
17
17
global . formatString = ( object ) => object !== undefined ? JSON . stringify ( object ) : null
18
18
19
19
const mp = require ( './lib/micropython.js' ) ;
20
- if ( typeof window === 'undefined' && typeof importScripts === 'undefined ') {
20
+ if ( typeof webpackJsonp !== 'object ') {
21
21
browser = false ;
22
22
pyjs = require ( 'fs' ) . readFileSync ( __dirname + '/js.py' ) . toString ( ) ;
23
23
}
Original file line number Diff line number Diff line change @@ -76,12 +76,12 @@ var mainProgram = function()
76
76
77
77
Module [ "onRuntimeInitialized" ] = mainProgram ;
78
78
79
- if ( typeof window === 'undefined' && typeof importScripts === 'undefined ') {
79
+ if ( typeof webpackJsonp !== 'object ') {
80
80
const file = require ( 'fs' ) . readFileSync ( __dirname + '/micropython.binary' ) ;
81
81
Module . emterpreterFile = file . buffer . slice ( file . byteOffset , file . byteOffset + file . byteLength ) ;
82
82
}
83
83
else {
84
- Module . emterpreterFile = require ( 'arraybuffer!./micropython.binary' ) ;
84
+ Module . emterpreterFile = require ( '! arraybuffer-loader !./micropython.binary' ) ;
85
85
}
86
86
// Copyright 2010 The Emscripten Authors. All rights reserved.
87
87
// Emscripten is available under two separate licenses, the MIT license and the
You can’t perform that action at this time.
0 commit comments