-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
33 lines (31 loc) · 1.04 KB
/
vite.config.ts
File metadata and controls
33 lines (31 loc) · 1.04 KB
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
import { defineConfig } from 'vite'
import { fresh } from '@fresh/plugin-vite'
import tailwindcss from '@tailwindcss/vite'
const PORT = Deno.env.get('PORT') || '8001'
export default defineConfig({
plugins: [
fresh(),
tailwindcss(),
],
resolve: {
alias: {
// preact/debug throws on string event handlers (e.g. onload="...") which is
// valid HTML for SSR but rejected in dev-only validation. Alias it to preact
// itself to skip the debug layer without affecting any other functionality.
'preact/debug': 'preact',
},
},
server: {
port: parseInt(PORT, 10),
// // Tell Vite's HMR client to connect through the HTTPS proxy rather than
// // directly to the Vite HTTP server. Without this, HMR module updates use
// // raw `fresh-island::` specifiers that the browser can't resolve.
// origin: `https://localhost:${HTTPS_PROXY_SERVER_PORT}`,
// hmr: {
// protocol: 'wss',
// host: 'localhost',
// clientPort: HTTPS_PROXY_SERVER_PORT,
// },
},
clearScreen: false,
})