-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
36 lines (35 loc) · 908 Bytes
/
vite.config.ts
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
32
33
34
35
36
/// <reference types="vitest" />
import vue from '@vitejs/plugin-vue';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
// Some settings taken as recommended from here: https://github.com/tauri-apps/tauri/issues/2794#issuecomment-1055285894
export default defineConfig({
plugins: [vue()],
server: {
port: 3000,
strictPort: true,
},
clearScreen: false,
css: {
preprocessorOptions: {
scss: {
additionalData: "@use './src/sass/vars' as v;",
},
},
},
build: {
// tauri supports es2021
target: ['es2021', 'chrome97', 'safari13'],
// produce sourcemaps for debug builds
sourcemap: !!process.env.TAURI_DEBUG,
minify: !process.env.TAURI_DEBUG,
},
test: {
environment: 'jsdom',
globals: true,
setupFiles: './src/__tests__/setup.ts',
clearMocks: true,
hookTimeout: 30000,
testTimeout: 30000,
},
});