Files
agroexpert/frontend/vite.config.js

27 lines
533 B
JavaScript
Raw Normal View History

2025-06-16 00:24:13 +03:00
import { defineConfig } from 'vite'
import fs from 'fs'
import path from 'path'
2024-03-01 17:47:03 +03:00
2025-06-16 00:24:13 +03:00
export default defineConfig({
root: 'src',
base: '/',
server: {
host: '0.0.0.0',
port: 5173,
strictPort: true,
cors: {
origin: '*',
2024-03-01 17:47:03 +03:00
},
2025-06-16 00:24:13 +03:00
https: {
key: fs.readFileSync(path.resolve(__dirname, '/certs/dev-key.pem')),
cert: fs.readFileSync(path.resolve(__dirname, '/certs/dev.pem')),
2024-03-01 17:47:03 +03:00
},
2024-03-15 17:52:18 +03:00
hmr: {
2025-06-16 00:24:13 +03:00
protocol: 'wss', // ⚠️ для HTTPS нужен wss
host: '194.87.253.43',
2024-03-15 17:52:18 +03:00
},
2024-03-01 17:47:03 +03:00
},
2025-06-16 00:24:13 +03:00
})
2024-03-15 17:52:18 +03:00