-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
25 lines (24 loc) · 821 Bytes
/
Copy pathvite.config.ts
File metadata and controls
25 lines (24 loc) · 821 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 { defineConfig } from 'vite';
// Relative base keeps asset paths working on GitHub Pages project sites.
export default defineConfig({
base: './',
server: {
// Bind all interfaces for LAN access, but keep HMR on the page host
// so opening via 127.0.0.1 or localhost does not 400 the websocket.
host: true,
port: 5173,
strictPort: true,
hmr: {
protocol: 'ws',
// Let the client use window.location.host (works for localhost and 127.0.0.1).
// Do not hardcode localhost — that breaks 127.0.0.1 tabs.
},
},
build: {
target: 'es2022',
sourcemap: false,
// WebLLM is intentionally a large, lazy worker/runtime chunk; model weights
// are downloaded separately only when the browser provider is selected.
chunkSizeWarningLimit: 6500,
},
});