File tree Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ export function FileManager() {
65
65
wasmCached . current = true ;
66
66
}
67
67
} catch ( error ) {
68
+ console . log ( error )
68
69
// File not ready yet, continue checking
69
70
}
70
71
} , 1000 ) ;
@@ -76,16 +77,18 @@ export function FileManager() {
76
77
( async ( ) => {
77
78
const wc = await webcontainer ;
78
79
79
- if ( ! wasmCached . current ) {
80
- const cachedWasm = await fetchCachedWasmFile ( ) ;
81
- if ( cachedWasm ) {
82
- await wc . fs . writeFile ( VERSIONED_RAILS_WASM_FILE_NAME , cachedWasm ) ;
83
- console . log ( `Rails WASM v${ RAILS_WASM_PACKAGE_VERSION } loaded from cache` ) ;
84
- wasmCached . current = true ;
85
- } else {
86
- await cacheWasmFile ( wc ) ;
87
- }
88
- }
80
+ // FIXME: caching doesn't work in Safari. Need to figure out a different strategy.
81
+ //
82
+ // if (!wasmCached.current) {
83
+ // const cachedWasm = await fetchCachedWasmFile();
84
+ // if (cachedWasm) {
85
+ // await wc.fs.writeFile(VERSIONED_RAILS_WASM_FILE_NAME, cachedWasm);
86
+ // console.log(`Rails WASM v${RAILS_WASM_PACKAGE_VERSION} loaded from cache`);
87
+ // wasmCached.current = true;
88
+ // } else {
89
+ // await cacheWasmFile(wc);
90
+ // }
91
+ // }
89
92
90
93
Object . entries ( files ) . forEach ( ( [ _ , fd ] ) => {
91
94
const dir = fd . path . split ( '/' ) . filter ( Boolean ) . slice ( - 2 , - 1 ) [ 0 ] ;
Original file line number Diff line number Diff line change 4
4
"version" : " 0.0.0" ,
5
5
"type" : " module" ,
6
6
"scripts" : {
7
- "preinstall" : " node scripts/preinstall.js" ,
8
7
"dev" : " vite" ,
9
8
"test" : " node --disable-warning=ExperimentalWarning ./scripts/test.js" ,
10
9
"test:watch" : " node --disable-warning=ExperimentalWarning --watch --watch-path=./workspace ./scripts/test.js" ,
13
12
"dependencies" : {
14
13
"@electric-sql/pglite" : " ^0.3.1" ,
15
14
"@ruby/wasm-wasi" : " ^2.7.1" ,
15
+ "@rails-tutorial/wasm" : " ^8.0.2-rc.1" ,
16
16
"express" : " ^5.1.0" ,
17
17
"multer" : " ^2.0.1" ,
18
18
"set-cookie-parser" : " ^2.7.1"
You can’t perform that action at this time.
0 commit comments