28 lines
641 B
JavaScript
28 lines
641 B
JavaScript
|
|
import {defineConfig} from 'vite'
|
|||
|
|
import vue from '@vitejs/plugin-vue'
|
|||
|
|
import tailwindcss from "@tailwindcss/vite"
|
|||
|
|
import path from 'path'
|
|||
|
|
|
|||
|
|
// https://vite.dev/config/
|
|||
|
|
export default defineConfig({
|
|||
|
|
plugins: [
|
|||
|
|
vue(),
|
|||
|
|
tailwindcss()
|
|||
|
|
],
|
|||
|
|
resolve: {
|
|||
|
|
alias: {
|
|||
|
|
'@': path.resolve(__dirname, './src')
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
server: {
|
|||
|
|
port: 8888,
|
|||
|
|
proxy: {
|
|||
|
|
// 婚礼纪 Go 后端运行在 :8080,接口统一以 /api 开头,无需重写
|
|||
|
|
'/api': {
|
|||
|
|
target: 'http://127.0.0.1:8080',
|
|||
|
|
changeOrigin: true
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|