fix: add compilerOptions to Svelte plugin in vitest config
Deploy Dashboard (Dev) / deploy-dev (push) Successful in 1m33s
Run Tests / Backend Tests (push) Successful in 2m6s
Run Tests / Frontend Tests (push) Failing after 2m19s
Run Tests / Test Summary (push) Failing after 13s

The Svelte plugin was receiving an incomplete config object, causing
Object.values() to fail on undefined in the hot-update plugin.

Added compilerOptions.dev to provide a complete plugin configuration.
This commit is contained in:
Gan, Jimmy
2026-04-08 00:47:31 +08:00
parent d136189d18
commit 24969d0d3e
+8 -1
View File
@@ -2,7 +2,14 @@ import { defineConfig } from 'vitest/config';
import { svelte } from '@sveltejs/vite-plugin-svelte'; import { svelte } from '@sveltejs/vite-plugin-svelte';
export default defineConfig({ export default defineConfig({
plugins: [svelte({ hot: !process.env.VITEST })], plugins: [
svelte({
hot: !process.env.VITEST,
compilerOptions: {
dev: true
}
})
],
test: { test: {
globals: true, globals: true,
environment: 'jsdom', environment: 'jsdom',