feat: refactor nxmesh-frontend to use React Router with new layout components
- Updated package.json to replace Vite with React Router for development and build scripts. - Added react-router.config.ts for configuration settings. - Created a new App component with a dashboard layout including header, sidebar, and footer. - Enhanced App.css with a professional theme and responsive design. - Removed old App.tsx and index.css files. - Introduced RootLayout component to encapsulate layout structure. - Developed Header, Footer, and Sidebar components for consistent layout. - Implemented routes for home and dashboard with key metrics and activity sections. - Updated vite.config.ts to integrate React Router and adjust SSR settings.
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react-swc'
|
||||
import { defineConfig } from 'vite';
|
||||
import { reactRouter } from '@react-router/dev/vite';
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
})
|
||||
plugins: [reactRouter()],
|
||||
ssr: {
|
||||
noExternal: ['@ant-design/icons', '@rc-component/util'],
|
||||
},
|
||||
resolve: {
|
||||
tsconfigPaths: true,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user