Rework #6

Merged
monoid merged 38 commits from dev into main 2024-04-17 01:45:37 +09:00
Showing only changes of commit 017e081b70 - Show all commits

View File

@ -1,9 +1,11 @@
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import path from 'node:path'
import react from '@vitejs/plugin-react-swc'
// https://vitejs.dev/config/
export default defineConfig({
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
return {
plugins: [react()],
resolve: {
alias: {
@ -12,7 +14,7 @@ export default defineConfig({
},
server: {
proxy: {
'/api': "https://aeolian.prelude.duckdns.org"
'/api': env.API_BASE_URL ?? 'http://localhost:8000',
}
}
})
}})