1
0
This repository has been archived on 2025-11-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
contaminus/frontend/vite.config.js
Jose fa1b457004 Refactor frontend components and contexts for improved structure and functionality
- Removed unnecessary comments and documentation from CardContainer, Header, HistoryCharts, MenuButton, PollutionMap, SideMenu, SummaryCards, and ThemeButton components.
- Updated import paths to use aliasing for cleaner code.
- Replaced the old context implementations (ConfigContext, DataContext, ThemeContext) with new hooks and context structure for better state management.
- Introduced a new axios instance for API calls to streamline requests.
- Added new utility functions for date and error parsing.
- Updated the main entry point and pages to reflect new context and component structures.
- Created new configuration files for development and production environments.
- Enhanced data fetching logic with improved error handling and loading states.
2025-05-06 03:52:24 +02:00

30 lines
578 B
JavaScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import cleanPlugin from 'vite-plugin-clean'
// https://vite.dev/config/
export default defineConfig({
server: {
host: "localhost",
port: 3000,
},
resolve: {
alias: {
'@/': '/src/',
},
},
plugins: [react(), cleanPlugin()],
build: {
rollupOptions: {
output: {
manualChunks: {
"react-vendors": ["react", "react-dom"],
"leaflet": ["leaflet"],
"chartjs": ["chart.js"]
}
}
}
},
publicDir: 'public',
})