Revert "fix: dev"

This reverts commit 48c84b4b9f.
This commit is contained in:
not-nullptr 2025-04-15 16:51:43 +01:00
parent 48c84b4b9f
commit 4e892adc10
1 changed files with 24 additions and 32 deletions

View File

@ -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,14 +45,7 @@ export default defineConfig(({ command }) => {
}, },
], ],
}), }),
]; ],
if (command === "serve") {
plugins.unshift(wasm());
}
return {
plugins,
worker: { worker: {
plugins: () => [wasm()], plugins: () => [wasm()],
format: "es", format: "es",
@ -75,5 +68,4 @@ export default defineConfig(({ command }) => {
build: { build: {
target: "esnext", target: "esnext",
}, },
};
}); });