localhost-front/vite.config.js
2025-01-09 16:27:58 +09:00

33 lines
1.1 KiB
JavaScript

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
// https://vite.dev/config/
export default defineConfig({
server: {
proxy: {
'/api': {
target: 'http://localhost:10325', // Spring Boot 서버 주소
changeOrigin: true,
},
},
},
plugins: [
vue(),
vueDevTools(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'@a': fileURLToPath(new URL('./src/assets/', import.meta.url)),
'@c': fileURLToPath(new URL('./src/components/', import.meta.url)),
'@v': fileURLToPath(new URL('./src/views/', import.meta.url)),
'@l': fileURLToPath(new URL('./src/layout/', import.meta.url)),
'@s': fileURLToPath(new URL('./src/stores/', import.meta.url)),
'@p': fileURLToPath(new URL('./src/common/plugin/', import.meta.url)),
"@api": fileURLToPath(new URL('./src/common/axios-interceptor.js', import.meta.url))
},
},
})