-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
31 lines (29 loc) · 912 Bytes
/
vite.config.ts
File metadata and controls
31 lines (29 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { promisify } from 'util';
import { exec } from 'child_process';
import { sveltekit } from '@sveltejs/kit/vite';
import { sentrySvelteKit } from '@sentry/sveltekit';
import { svelteTesting } from '@testing-library/svelte/vite';
import { defineConfig } from 'vitest/config';
import pkg from './package.json';
const execAsync = promisify(exec);
const version = (await execAsync('git describe --tags --abbrev=0')).stdout.trim().replace(/^v/, '');
const build = (await execAsync('git rev-list --count HEAD')).stdout.trim();
export default defineConfig({
plugins: [
sentrySvelteKit({
adapter: process.env.ADAPTER_NODE ? 'node' : 'auto',
sourceMapsUploadOptions: {
release: {
name: `${pkg.name}@${version}+${build}`
}
}
}),
sveltekit(),
svelteTesting()
],
test: {
include: ['src/**/*.{test,spec}.{js,ts}'],
environment: 'jsdom',
setupFiles: ['./vitest.setup.ts']
}
});