vite.config.ts 配置
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
port: 5732, //Vue启动端口地址,设置后需要重新run
open: true //编译后自动打开浏览器
}
})
浙公网安备 33010602011771号