diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..1c60328 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,20 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +export default defineConfig({ + plugins: [react()], + build: { + outDir: 'dist', + sourcemap: false, + minify: 'terser' + }, + server: { + proxy: { + '/api': { + target: 'http://localhost:8000', + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api/, '/api') + } + } + } +})