File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ {"plugins" : [" static-fs" ]}
2
+
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ global.formatString = (object) => object !== undefined ? JSON.stringify(object)
18
18
19
19
const mp = require ( './lib/micropython.js' ) ;
20
20
if ( typeof webpackJsonp !== 'object' ) {
21
- browser = false ;
22
21
pyjs = require ( 'fs' ) . readFileSync ( __dirname + '/js.py' ) . toString ( ) ;
23
22
}
24
23
else {
Original file line number Diff line number Diff line change @@ -76,8 +76,11 @@ var mainProgram = function()
76
76
77
77
Module [ "onRuntimeInitialized" ] = mainProgram ;
78
78
79
- if ( typeof webpackJsonp !== 'object' ) {
80
- const file = require ( 'fs' ) . readFileSync ( __dirname + '/micropython.binary' ) ;
79
+ if ( true ) { //typeof webpackJsonp !== 'object') {
80
+ const fs = require ( 'fs' )
81
+ const path = require ( 'path' )
82
+ console . log ( fs )
83
+ const file = fs . readFileSync ( __dirname + '/micropython.binary' ) ;
81
84
Module . emterpreterFile = file . buffer . slice ( file . byteOffset , file . byteOffset + file . byteLength ) ;
82
85
}
83
86
else {
Original file line number Diff line number Diff line change 27
27
"homepage" : " https://github.com/rafi16jan/micropython-wasm#readme" ,
28
28
"dependencies" : {
29
29
"arraybuffer-loader" : " ^1.0.7" ,
30
+ "babel-plugin-static-fs" : " ^1.2.0" ,
30
31
"node-fetch" : " ^2.6.0" ,
31
32
"raw-loader" : " ^2.0.0"
32
33
}
You can’t perform that action at this time.
0 commit comments