company_website/vite.config.ts

19 lines
481 B
TypeScript
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'
import path from 'path'
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'), // 将 @ 指向 src 目录
},
},
server: {
host: '0.0.0.0', // 监听所有网络接口
port: 5173, // 可自定义端口默认5173
open: false // 可选:是否自动打开浏览器
}
})