mirror of https://github.com/VERT-sh/VERT.git
fix: fix AVIF/JXL support
we need to copy the vips-*.wasm files from node_modules into vite's workers folder
This commit is contained in:
parent
e9ea02198f
commit
582f99588f
|
@ -34,8 +34,8 @@ export class VipsConverter extends Converter {
|
||||||
".tiff",
|
".tiff",
|
||||||
".jfif",
|
".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
|
//".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
|
".avif",
|
||||||
//".jxl",
|
".jxl",
|
||||||
];
|
];
|
||||||
|
|
||||||
public readonly reportsProgress = false;
|
public readonly reportsProgress = false;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import Vips from "wasm-vips";
|
import Vips from "wasm-vips";
|
||||||
|
|
||||||
const vipsPromise = Vips({ dynamicLibraries: [] });
|
const vipsPromise = Vips();
|
||||||
|
|
||||||
vipsPromise
|
vipsPromise
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
|
@ -38,6 +38,10 @@ export default defineConfig({
|
||||||
src: "_headers",
|
src: "_headers",
|
||||||
dest: "",
|
dest: "",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
src: "node_modules/wasm-vips/lib/vips-*.wasm",
|
||||||
|
dest: "_app/immutable/workers",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue