Files
food-vue-project/vite.config.js
T

24 lines
491 B
JavaScript

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))
}
}
})
// export default defineConfig({
// plugins: [vue()],
// server: {
// port: 3000,
// host: '0.0.0.0', // 监听所有网络接口
// cors: true, // 启用跨域
// }
// })