fix: 修复 Vite allow list 错误

This commit is contained in:
CHE LIANG ZHAO
2026-01-26 16:24:39 +08:00
parent ab9aab7beb
commit ef34a1bb5d
4 changed files with 14 additions and 6 deletions

View File

@@ -2,10 +2,18 @@ import { defineConfig } from 'vitest/config';
import { playwright } from '@vitest/browser-playwright';
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { readFileSync } from 'fs';
import { fileURLToPath } from 'url';
const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf-8'));
export default defineConfig({
plugins: [sveltekit(), tailwindcss()],
define: {
__APP_VERSION__: JSON.stringify(pkg.version)
},
server: {
proxy: {
'/api': {