2024-03-26 23:58:26 +09:00
|
|
|
import { defineConfig } from 'vite'
|
2024-04-03 22:12:46 +09:00
|
|
|
import path from 'node:path'
|
2024-03-26 23:58:26 +09:00
|
|
|
import react from '@vitejs/plugin-react-swc'
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
|
|
plugins: [react()],
|
2024-04-03 22:12:46 +09:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@': path.resolve(__dirname, './src'),
|
|
|
|
},
|
|
|
|
},
|
2024-04-03 21:48:54 +09:00
|
|
|
server: {
|
|
|
|
proxy: {
|
|
|
|
'/api': {
|
|
|
|
target: 'http://localhost:8080',
|
|
|
|
changeOrigin: true,
|
|
|
|
// rewrite: path => path.replace(/^\/api/, '')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-26 23:58:26 +09:00
|
|
|
})
|