Files
newToy/vite.config.js
2025-11-23 23:55:10 +08:00

19 lines
508 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// Vite 配置:默认监听 0.0.0.0,绑定所有网卡 IP
export default defineConfig({
plugins: [vue()],
server: {
host: '0.0.0.0', // 监听所有网卡
port: 5173, // 如需更换端口可修改这里
https: false, // 启用 HTTPS使用自签名证书
},
preview: {
host: '0.0.0.0', // preview 模式也监听所有网卡
port: 5173, // preview 模式使用相同端口
},
})