57 lines
1.3 KiB
TypeScript
57 lines
1.3 KiB
TypeScript
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import { playwright } from '@vitest/browser-playwright';
|
|
import comlink from 'vite-plugin-comlink';
|
|
import glsl from 'vite-plugin-glsl';
|
|
import wasm from 'vite-plugin-wasm';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
tailwindcss(),
|
|
comlink(),
|
|
sveltekit(),
|
|
glsl(),
|
|
wasm()
|
|
],
|
|
worker: {
|
|
plugins: () => [
|
|
comlink()
|
|
]
|
|
},
|
|
ssr: {
|
|
noExternal: ['three']
|
|
},
|
|
build: {
|
|
chunkSizeWarningLimit: 2000
|
|
},
|
|
test: {
|
|
expect: { requireAssertions: true },
|
|
projects: [
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'client',
|
|
browser: {
|
|
enabled: true,
|
|
provider: playwright(),
|
|
instances: [{ browser: 'firefox', headless: true }]
|
|
},
|
|
include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
|
|
exclude: ['src/lib/server/**']
|
|
}
|
|
},
|
|
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'server',
|
|
environment: 'node',
|
|
include: ['src/**/*.{test,spec}.{js,ts}'],
|
|
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}']
|
|
}
|
|
}
|
|
]
|
|
}
|
|
});
|