@@ -42,28 +42,28 @@ export async function vendorDeno({
4242 cwd,
4343 } )
4444
45- if ( wasmFilesToDownload . length !== 0 ) {
46- console . log ( `⬇️ Downloading wasm files...` )
45+ // if (wasmFilesToDownload.length !== 0) {
46+ // console.log(`⬇️ Downloading wasm files...`)
4747
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)
5656
57- const destination = join ( vendorDest , url . hostname , url . pathname )
57+ // const destination = join(vendorDest, url.hostname, url.pathname)
5858
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+ // }
6767
6868 console . log ( `✅ Vendored Deno modules for '${ vendorSource } ' into '${ vendorDest } '` )
6969}
0 commit comments