blob: ef26a3a47468c60390b634b9a91ad731146812d1 (
plain)
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
|
import tailwindcss from '@tailwindcss/vite';
import devtoolsJson from 'vite-plugin-devtools-json';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig, loadEnv } from 'vite';
export default defineConfig(({ mode }) => {
// @ts-expect-error process is loaded
const env = loadEnv(mode, process.cwd());
console.log("Found API URL:", env.VITE_BACKEND_URL);
const API_URL = (env.VITE_BACKEND_URL ?? "http://127.0.1:8080");
return {
plugins: [tailwindcss(), sveltekit(), devtoolsJson()],
optimizeDeps: {
exclude: ['chart.js']
},
server: {
proxy: {
'/api': API_URL
},
allowedHosts: [
'patapimvest.esteban-charvin.dev',
'localhost',
'127.0.0.1'
],
}
}
});
|