Rework #6
					 1 changed files with 6 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -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',
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
}})
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue