2023-06-22 15:30:03 +03:00
|
|
|
import { defineConfig } from 'vitest/config';
|
2023-02-24 12:46:41 +03:00
|
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
2023-04-21 16:55:54 +03:00
|
|
|
import { sentrySvelteKit } from '@sentry/sveltekit';
|
2023-01-31 17:55:57 +03:00
|
|
|
|
|
|
|
export default defineConfig({
|
2023-04-21 16:55:54 +03:00
|
|
|
plugins: [
|
|
|
|
sentrySvelteKit({
|
2023-07-13 11:30:58 +03:00
|
|
|
autoInstrument: false,
|
2023-04-21 16:55:54 +03:00
|
|
|
sourceMapsUploadOptions: {
|
2023-04-27 09:24:09 +03:00
|
|
|
dryRun: process.env.SENTRY_RELEASE === undefined,
|
2023-04-21 16:55:54 +03:00
|
|
|
org: 'gitbutler',
|
|
|
|
project: 'desktop',
|
|
|
|
// this is nikita galaiko's personal sentry api token.
|
|
|
|
authToken: '04c6bc1df15346f39ed2fbeb99c0a8e25bcbedc4aba9461bb3a471733b8c80db',
|
|
|
|
include: ['build'],
|
|
|
|
cleanArtifacts: true,
|
|
|
|
setCommits: {
|
|
|
|
auto: true,
|
|
|
|
ignoreMissing: true,
|
|
|
|
ignoreEmpty: true
|
|
|
|
},
|
|
|
|
telemetry: false,
|
2023-04-25 11:09:28 +03:00
|
|
|
uploadSourceMaps: process.env.SENTRY_RELEASE !== undefined
|
2023-04-21 16:55:54 +03:00
|
|
|
}
|
|
|
|
}),
|
|
|
|
sveltekit()
|
|
|
|
],
|
2023-01-31 17:55:57 +03:00
|
|
|
|
2023-02-27 14:48:08 +03:00
|
|
|
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
|
|
|
// prevent vite from obscuring rust errors
|
|
|
|
clearScreen: false,
|
|
|
|
// tauri expects a fixed port, fail if that port is not available
|
|
|
|
server: {
|
|
|
|
port: 1420,
|
|
|
|
strictPort: true
|
|
|
|
},
|
|
|
|
// to make use of `TAURI_DEBUG` and other env variables
|
|
|
|
// https://tauri.studio/v1/api/config#buildconfig.beforedevcommand
|
|
|
|
envPrefix: ['VITE_', 'TAURI_'],
|
|
|
|
build: {
|
|
|
|
// Tauri supports es2021
|
|
|
|
target: process.env.TAURI_PLATFORM == 'windows' ? 'chrome105' : 'safari13',
|
|
|
|
// minify production builds
|
|
|
|
minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
|
|
|
|
// ship sourcemaps for better sentry error reports
|
2023-04-03 15:01:43 +03:00
|
|
|
sourcemap: 'inline'
|
2023-06-22 15:30:03 +03:00
|
|
|
},
|
|
|
|
test: {
|
2023-07-13 10:11:58 +03:00
|
|
|
deps: {
|
|
|
|
inline: ['sorcery']
|
|
|
|
},
|
2023-06-22 15:30:03 +03:00
|
|
|
includeSource: ['src/**/*.{js,ts}']
|
2023-02-27 14:48:08 +03:00
|
|
|
}
|
2023-01-31 17:55:57 +03:00
|
|
|
});
|