-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathvite.config.ts
More file actions
25 lines (24 loc) · 682 Bytes
/
vite.config.ts
File metadata and controls
25 lines (24 loc) · 682 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
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
plugins: [tailwindcss(), sveltekit()],
worker: {
format: 'es'
},
server: {
host: '0.0.0.0',
port: 5000,
allowedHosts: true,
proxy: {
// Dev-only proxy for testing against a local btcmap-api instance.
// Set VITE_API_BASE_URL=/btcmap-api-proxy in .env, then start the
// API with `cargo run` (binds to 127.0.0.1:8000 by default).
'/btcmap-api-proxy': {
target: 'http://127.0.0.1:8000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/btcmap-api-proxy/, ''),
},
},
}
});