Spaces:
Sleeping
Sleeping
| import { defineConfig } from "vite"; | |
| import react from "@vitejs/plugin-react-swc"; | |
| import path from "path"; | |
| import { componentTagger } from "lovable-tagger"; | |
| // https://vitejs.dev/config/ | |
| export default defineConfig(({ mode }) => ({ | |
| base: "", // Empty string ensures assets are loaded with relative paths | |
| server: { | |
| host: "::", | |
| port: 8080, | |
| }, | |
| preview: { | |
| host: '0.0.0.0', | |
| port: 7860, | |
| strictPort: true, | |
| allowedHosts: ['devarshia5-pmtool.hf.space'] // Add this line | |
| }, | |
| plugins: [ | |
| react(), | |
| mode === 'development' && | |
| componentTagger(), | |
| ].filter(Boolean), | |
| resolve: { | |
| alias: { | |
| "@": path.resolve(__dirname, "./src"), | |
| }, | |
| }, | |
| optimizeDeps: { | |
| include: ['papaparse'], | |
| }, | |
| })); | |