-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathvite.config.ts
More file actions
40 lines (39 loc) · 897 Bytes
/
Copy pathvite.config.ts
File metadata and controls
40 lines (39 loc) · 897 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
32
33
34
35
36
37
38
39
40
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import autoprefixer from 'autoprefixer';
import path from 'path';
import tailwindcss from 'tailwindcss';
export default defineConfig({
plugins: [svelte()],
css: {
postcss: {
plugins: [tailwindcss(), autoprefixer()],
},
},
clearScreen: false,
server: {
host: '127.0.0.1',
port: 5173,
strictPort: true,
cors: {
origin: /^https?:\/\/(?:127\.0\.0\.1|localhost)(?::\d+)?$/,
},
hmr: {
host: '127.0.0.1',
},
},
envPrefix: ['VITE_', 'TAURI_'],
optimizeDeps: {
entries: ['index.html'],
},
build: {
target: ['es2021', 'chrome100', 'safari13'],
minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
sourcemap: !!process.env.TAURI_DEBUG,
},
resolve: {
alias: {
'$lib': path.resolve('./src/lib'),
},
},
});