You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
691 B
24 lines
691 B
import { defineConfig } from 'vite'
|
|
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig(({ mode }) => ({
|
|
plugins: [svelte()],
|
|
resolve: {
|
|
// Prefer browser Svelte build so mount() is available (avoid "lifecycle_function_unavailable" on server/workers)
|
|
conditions: ['browser'],
|
|
},
|
|
test: {
|
|
include: ['src/**/*.{test,spec}.{js,ts}'],
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: ['./src/test/setup.js'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'html'],
|
|
include: ['src/**/*.{js,ts,svelte}'],
|
|
exclude: ['src/test/**', '**/*.test.js', '**/*.spec.js'],
|
|
},
|
|
},
|
|
}))
|