Files
hunli/vite-tailwindcss/vite.config.js
2026-08-01 13:57:14 +08:00

28 lines
642 B
JavaScript
Raw 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 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:15201',
changeOrigin: true
}
}
}
})