diff --git a/packages/integrations/image/src/vendor/squoosh/codecs.ts b/packages/integrations/image/src/vendor/squoosh/codecs.ts index 00cd2e76ce0a..eb83df97dc40 100644 --- a/packages/integrations/image/src/vendor/squoosh/codecs.ts +++ b/packages/integrations/image/src/vendor/squoosh/codecs.ts @@ -35,42 +35,42 @@ export interface RotateOptions { // MozJPEG import type { MozJPEGModule as MozJPEGEncodeModule } from './mozjpeg/mozjpeg_enc' import mozDec from './mozjpeg/mozjpeg_node_dec.js' +import mozDecWasm from './mozjpeg/mozjpeg_node_dec.wasm.js' import mozEnc from './mozjpeg/mozjpeg_node_enc.js' -import mozEncWasm from './mozjpeg/mozjpeg_node_enc.wasm.js'; -import mozDecWasm from './mozjpeg/mozjpeg_node_dec.wasm.js'; +import mozEncWasm from './mozjpeg/mozjpeg_node_enc.wasm.js' // WebP import type { WebPModule as WebPEncodeModule } from './webp/webp_enc' import webpDec from './webp/webp_node_dec.js' +import webpDecWasm from './webp/webp_node_dec.wasm.js' import webpEnc from './webp/webp_node_enc.js' -import webpEncWasm from './webp/webp_node_enc.wasm.js'; -import webpDecWasm from './webp/webp_node_dec.wasm.js'; +import webpEncWasm from './webp/webp_node_enc.wasm.js' // AVIF import type { AVIFModule as AVIFEncodeModule } from './avif/avif_enc' import avifDec from './avif/avif_node_dec.js' +import avifDecWasm from './avif/avif_node_dec.wasm.js' import avifEnc from './avif/avif_node_enc.js' -import avifEncWasm from './avif/avif_node_enc.wasm.js'; -import avifDecWasm from './avif/avif_node_dec.wasm.js'; +import avifEncWasm from './avif/avif_node_enc.wasm.js' // PNG -import * as pngEncDec from './png/squoosh_png.js'; -import pngEncDecWasm from './png/squoosh_png_bg.wasm.js'; +import * as pngEncDec from './png/squoosh_png.js' +import pngEncDecWasm from './png/squoosh_png_bg.wasm.js' const pngEncDecInit = () => pngEncDec.default(pngEncDecWasm) // OxiPNG -import * as oxipng from './png/squoosh_oxipng.js'; -import oxipngWasm from './png/squoosh_oxipng_bg.wasm.js'; +import * as oxipng from './png/squoosh_oxipng.js' +import oxipngWasm from './png/squoosh_oxipng_bg.wasm.js' const oxipngInit = () => oxipng.default(oxipngWasm) // Resize import * as resize from './resize/squoosh_resize.js' -import resizeWasm from './resize/squoosh_resize_bg.wasm.js'; +import resizeWasm from './resize/squoosh_resize_bg.wasm.js' const resizeInit = () => resize.default(resizeWasm) // rotate -import rotateWasm from './rotate/rotate.wasm.js'; +import rotateWasm from './rotate/rotate.wasm.js' // Our decoders currently rely on a `ImageData` global. import ImageData from './image_data.js' diff --git a/packages/integrations/image/wasmize.mjs b/packages/integrations/image/wasmize.mjs index fc570538dcdd..55d364b89ffc 100644 --- a/packages/integrations/image/wasmize.mjs +++ b/packages/integrations/image/wasmize.mjs @@ -4,7 +4,7 @@ import * as fs from 'node:fs'; const result = await fastglob(fileURLToPath(new URL('./src/**/*.wasm', import.meta.url))); -for(const filepath of result) { +for (const filepath of result) { const buffer = await fs.promises.readFile(filepath); const base64 = buffer.toString('base64'); const source = `export default Buffer.from(${JSON.stringify(base64)}, 'base64');`;