mirror of https://github.com/VERT-sh/VERT.git
parent
48c84b4b9f
commit
4e892adc10
|
@ -1,11 +1,11 @@
|
||||||
import { sveltekit } from "@sveltejs/kit/vite";
|
import { sveltekit } from "@sveltejs/kit/vite";
|
||||||
import { defineConfig, type PluginOption } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import { viteStaticCopy } from "vite-plugin-static-copy";
|
import { viteStaticCopy } from "vite-plugin-static-copy";
|
||||||
import svg from "@poppanator/sveltekit-svg";
|
import svg from "@poppanator/sveltekit-svg";
|
||||||
import wasm from "vite-plugin-wasm";
|
import wasm from "vite-plugin-wasm";
|
||||||
|
|
||||||
export default defineConfig(({ command }) => {
|
export default defineConfig({
|
||||||
const plugins: PluginOption[] = [
|
plugins: [
|
||||||
sveltekit(),
|
sveltekit(),
|
||||||
{
|
{
|
||||||
name: "vips-request-middleware",
|
name: "vips-request-middleware",
|
||||||
|
@ -45,35 +45,27 @@ export default defineConfig(({ command }) => {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
];
|
],
|
||||||
|
worker: {
|
||||||
if (command === "serve") {
|
plugins: () => [wasm()],
|
||||||
plugins.unshift(wasm());
|
format: "es",
|
||||||
}
|
},
|
||||||
|
optimizeDeps: {
|
||||||
return {
|
exclude: [
|
||||||
plugins,
|
"wasm-vips",
|
||||||
worker: {
|
"@ffmpeg/core-mt",
|
||||||
plugins: () => [wasm()],
|
"@ffmpeg/ffmpeg",
|
||||||
format: "es",
|
"@ffmpeg/util",
|
||||||
},
|
],
|
||||||
optimizeDeps: {
|
},
|
||||||
exclude: [
|
css: {
|
||||||
"wasm-vips",
|
preprocessorOptions: {
|
||||||
"@ffmpeg/core-mt",
|
scss: {
|
||||||
"@ffmpeg/ffmpeg",
|
api: "modern",
|
||||||
"@ffmpeg/util",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
css: {
|
|
||||||
preprocessorOptions: {
|
|
||||||
scss: {
|
|
||||||
api: "modern",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
},
|
||||||
target: "esnext",
|
build: {
|
||||||
},
|
target: "esnext",
|
||||||
};
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue