Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

fix: fix AVIF/JXL support

JovannMC582f99588f9f
diff --git a/src/lib/converters/vips.svelte.ts b/src/lib/converters/vips.svelte.ts
index 6ebf401..33fa389 100644
--- a/src/lib/converters/vips.svelte.ts
+++ b/src/lib/converters/vips.svelte.ts
@@ -34,8 +34,8 @@ export class VipsConverter extends Converter {
".tiff",
".jfif",
//".heif", HEIF files that are encoded like HEIC files (and HEIC files in general) aren't supported due to https://github.com/kleisauke/wasm-vips/issues/3
- //".avif", there is an issue with vite not bundling the wasm-vips' dynamicLibraries wasm files correctly
- //".jxl",
+ ".avif",
+ ".jxl",
];
public readonly reportsProgress = false;
diff --git a/src/lib/workers/vips.ts b/src/lib/workers/vips.ts
index ad54736..35665ed 100644
--- a/src/lib/workers/vips.ts
+++ b/src/lib/workers/vips.ts
@@ -1,6 +1,6 @@
import Vips from "wasm-vips";
-const vipsPromise = Vips({ dynamicLibraries: [] });
+const vipsPromise = Vips();
vipsPromise
.then(() => {
diff --git a/vite.config.ts b/vite.config.ts
index 07f3d05..c4ec1e8 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -38,6 +38,10 @@ export default defineConfig({
src: "_headers",
dest: "",
},
+ {
+ src: "node_modules/wasm-vips/lib/vips-*.wasm",
+ dest: "_app/immutable/workers",
+ },
],
}),
],