指定端口
package.json 修改: – – port xxxx
"scripts": {
"dev": "vite --port 5000",
"build": "vite build",
"preview": "vite preview"
},
ip
vite.config.js: 增加server{host:‘xxx.x.x.x’}
export default defineConfig({
plugins: [vue(),WindiCSS()],
server:{
host:'0.0.0.0'
}
})