-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
36 lines (34 loc) · 801 Bytes
/
vite.config.js
File metadata and controls
36 lines (34 loc) · 801 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
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import { readFileSync } from 'fs';
const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'));
export default defineConfig({
define: {
__APP_VERSION__: JSON.stringify(pkg.version)
},
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
},
optimizeDeps: {
exclude: ['js-big-decimal']
},
build: {
target: 'es2015',
// Ensure assets are properly hashed for cache busting
rollupOptions: {
output: {
manualChunks: undefined
}
}
},
server: {
proxy: {
// Proxy API calls to Django during development
'/api': {
target: process.env.VITE_API_BASE_URL || 'http://localhost:8000',
changeOrigin: true
}
}
}
});