-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.js
46 lines (39 loc) · 1.01 KB
/
vite.config.js
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
34
35
36
37
38
39
40
41
42
43
44
45
46
// vite.config.js
import { defineConfig } from 'vite';
export default defineConfig({
base: '/starpages/',
// Customizing the build options:
build: {
target: 'ES2020',
rollupOptions: {
input: '/public/pixel-mixer.html',
output: {
dir: `dist/${new Date().getFullYear()}${new Date().getMonth()+1}${new Date().getDate()}`,
format: 'es'
}
}
},
esbuild: {
target: 'ES2020'
},
// Server-specific configurations for development:
server: {
// Set the host URL
host: '0.0.0.0', // Listen on all network interfaces
// host: 'specific-hostname', // Or set a specific hostname
// Other server options can be set here
port: 3010, // Optional: Set a specific port
// cause WSL
watch: {
usePolling: true,
interval: 500
},
hmr: {
// HMR-specific configurations
protocol: 'ws', // or 'wss' for secure connections
host: '127.0.0.1',
port: 3009,
// You can specify other options as needed
}
}
});