Spaces:
Runtime error
Runtime error
Download Frontend/vite.config.js from rabieifical/math-engine: direct link, hf CLI and curl.
- Browser
- Download file 1.52 kB
-
https://huggingface.co/spaces/rabieifical/math-engine/resolve/main/Frontend/vite.config.js
- Command line
-
hf download hf://spaces/rabieifical/math-engine/Frontend/vite.config.js
-
curl -L -o vite.config.js https://huggingface.co/spaces/rabieifical/math-engine/resolve/main/Frontend/vite.config.js
1.52 kB
| import tailwindcss from '@tailwindcss/vite'; | |
| import react from '@vitejs/plugin-react'; | |
| import path from 'path'; | |
| import {defineConfig, loadEnv} from 'vite'; | |
| export default defineConfig(({mode}) => { | |
| const env = loadEnv(mode, '.', ''); | |
| return { | |
| plugins: [react(), tailwindcss()], | |
| resolve: { | |
| alias: { | |
| '@': path.resolve(__dirname, '.'), | |
| }, | |
| }, | |
| server: { | |
| watch: { | |
| ignored: ['**/history.json'] | |
| }, | |
| // Set DISABLE_HMR=true in .env to turn off hot module replacement. | |
| hmr: process.env.DISABLE_HMR !== 'true', | |
| proxy: { | |
| '/api/search': { | |
| target: 'http://localhost:8000', | |
| changeOrigin: true, | |
| rewrite: (path) => path.replace(/^\/api\/search/, '/search'), | |
| }, | |
| '/api/evaluate': { | |
| target: 'http://localhost:8000', | |
| changeOrigin: true, | |
| rewrite: (path) => path.replace(/^\/api\/evaluate/, '/evaluate'), | |
| }, | |
| '/api/health': { | |
| target: 'http://localhost:8000', | |
| changeOrigin: true, | |
| rewrite: (path) => path.replace(/^\/api\/health/, '/health'), | |
| }, | |
| '/api/stats': { | |
| target: 'http://localhost:8000', | |
| changeOrigin: true, | |
| rewrite: (path) => path.replace(/^\/api\/stats/, '/stats'), | |
| }, | |
| '/api/explain': { | |
| target: 'http://localhost:8000', | |
| changeOrigin: true, | |
| rewrite: (path) => path.replace(/^\/api\/explain/, '/explain'), | |
| }, | |
| }, | |
| }, | |
| }; | |
| }); | |