forked from 10mfox/Gethomepage-Custom-Css
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
41 lines (39 loc) · 814 Bytes
/
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
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// Custom startup logger
const customLogger = {
hasWarned: false,
info(msg) {
if (msg.includes('ready in')) {
const local = msg.match(/Local:.+/);
if (local) {
console.clear();
console.log('CSS Editor Ready at http://localhost:' + (process.env.PORT || '5173'));
}
return;
}
},
warn() {},
warnOnce() {},
error(msg) {
console.error(msg);
}
};
export default defineConfig({
plugins: [react()],
server: {
host: true,
port: parseInt(process.env.PORT || '5173'),
strictPort: true,
watch: {
usePolling: true
},
hmr: {
overlay: false
},
clearScreen: true,
logger: customLogger
},
logLevel: 'error',
clearScreen: true
})