28 lines
601 B
JavaScript
28 lines
601 B
JavaScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import fs from 'fs';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 5173,
|
|
https: {
|
|
key: fs.readFileSync(path.resolve(__dirname, 'key.pem')),
|
|
cert: fs.readFileSync(path.resolve(__dirname, 'cert.pem'))
|
|
},
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3000',
|
|
changeOrigin: true
|
|
},
|
|
'/hubs': {
|
|
target: 'http://localhost:3000',
|
|
changeOrigin: true,
|
|
ws: true
|
|
}
|
|
}
|
|
}
|
|
});
|