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 //编译后自动打开浏览器 } })
标签:vue,url,ts,vitejs,import,config,vite From: https://www.cnblogs.com/friend/p/17204402.html