mirror of
https://github.com/Jackzmc/storage.git
synced 2025-05-07 13:03:21 +00:00
54 lines
1.1 KiB
TypeScript
54 lines
1.1 KiB
TypeScript
import { svelteTesting } from '@testing-library/svelte/vite';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import { paraglideVitePlugin } from '@inlang/paraglide-js';
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { defineConfig } from 'vite';
|
|
import Icons from 'unplugin-icons/vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
tailwindcss(),
|
|
sveltekit(),
|
|
paraglideVitePlugin({
|
|
project: './project.inlang',
|
|
outdir: './src/lib/paraglide'
|
|
} ),
|
|
Icons( {
|
|
compiler: 'svelte',
|
|
})
|
|
],
|
|
server: {
|
|
proxy: {
|
|
'^/api': {
|
|
target: "http://localhost:8080",
|
|
changeOrigin: true,
|
|
ws: true
|
|
}
|
|
}
|
|
},
|
|
test: {
|
|
workspace: [
|
|
{
|
|
extends: './vite.config.ts',
|
|
plugins: [svelteTesting()],
|
|
test: {
|
|
name: 'client',
|
|
environment: 'jsdom',
|
|
clearMocks: true,
|
|
include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
|
|
exclude: ['src/lib/server/**'],
|
|
setupFiles: ['./vitest-setup-client.ts']
|
|
}
|
|
},
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'server',
|
|
environment: 'node',
|
|
include: ['src/**/*.{test,spec}.{js,ts}'],
|
|
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}']
|
|
}
|
|
}
|
|
]
|
|
}
|
|
});
|