-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
28 lines (26 loc) · 821 Bytes
/
Copy pathvite.config.ts
File metadata and controls
28 lines (26 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
26
27
28
import { resolve } from 'node:path'
import { defineConfig } from 'vite'
const playgroundServer = `http://localhost:${process.env.PLAYGROUND_SERVER_PORT ?? 3030}`
export default defineConfig({
root: 'playground',
resolve: {
// packages/agui imports the core by its published name; the playground
// builds against live src (same alias as vitest.config.ts)
alias: { '@baruch-eric/stream-ui': resolve(__dirname, 'src/index.ts') },
},
server: {
port: 5173,
proxy: {
'/api': { target: playgroundServer, changeOrigin: true },
'/agui': { target: playgroundServer, changeOrigin: true },
},
},
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'playground/index.html'),
agui: resolve(__dirname, 'playground/agui.html'),
},
},
},
})