@@ -42,28 +42,28 @@ export async function vendorDeno({
42
42
cwd,
43
43
} )
44
44
45
- if ( wasmFilesToDownload . length !== 0 ) {
46
- console . log ( `⬇️ Downloading wasm files...` )
45
+ // if (wasmFilesToDownload.length !== 0) {
46
+ // console.log(`⬇️ Downloading wasm files...`)
47
47
48
- // deno vendor doesn't work well with wasm files
49
- // see https://github.com/denoland/deno/issues/14123
50
- // to workaround this we copy the wasm files manually
51
- // (note Deno 2 allows to vendor wasm files, but it also require modules to import them and not fetch and instantiate them
52
- // se being able to drop downloading is dependent on implementation of wasm handling in external modules as well)
53
- await Promise . all (
54
- wasmFilesToDownload . map ( async ( urlString ) => {
55
- const url = new URL ( urlString )
48
+ // // deno vendor doesn't work well with wasm files
49
+ // // see https://github.com/denoland/deno/issues/14123
50
+ // // to workaround this we copy the wasm files manually
51
+ // // (note Deno 2 allows to vendor wasm files, but it also require modules to import them and not fetch and instantiate them
52
+ // // so being able to drop downloading is dependent on implementation of wasm handling in external modules as well)
53
+ // await Promise.all(
54
+ // wasmFilesToDownload.map(async (urlString) => {
55
+ // const url = new URL(urlString)
56
56
57
- const destination = join ( vendorDest , url . hostname , url . pathname )
57
+ // const destination = join(vendorDest, url.hostname, url.pathname)
58
58
59
- const res = await fetch ( url )
60
- if ( ! res . ok )
61
- throw new Error ( `Failed to fetch .wasm file to vendor. Response status: ${ res . status } ` )
62
- const fileStream = createWriteStream ( destination , { flags : 'wx' } )
63
- await finished ( Readable . fromWeb ( res . body ) . pipe ( fileStream ) )
64
- } ) ,
65
- )
66
- }
59
+ // const res = await fetch(url)
60
+ // if (!res.ok)
61
+ // throw new Error(`Failed to fetch .wasm file to vendor. Response status: ${res.status}`)
62
+ // const fileStream = createWriteStream(destination, { flags: 'wx' })
63
+ // await finished(Readable.fromWeb(res.body).pipe(fileStream))
64
+ // }),
65
+ // )
66
+ // }
67
67
68
68
console . log ( `✅ Vendored Deno modules for '${ vendorSource } ' into '${ vendorDest } '` )
69
69
}
0 commit comments