This commit is contained in:
Eshan Roy
2024-12-03 19:41:44 +05:30
parent baf2807fe8
commit 01ddacda24
4 changed files with 24 additions and 3 deletions

View File

@@ -1,8 +1,9 @@
{
"name": "snigdha-os-website",
"name": "snigdhaos-web-dev",
"private": true,
"version": "0.0.0",
"type": "module",
"homepage": "https://snigdha-os.github.io/snigdhaos-web-dev",
"scripts": {
"dev": "vite",
"build": "vite build",

20
public/404.html Normal file
View File

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>404 - Not Found</title>
<script>
// Redirect all 404 routes to the homepage (index.html) to let React Router handle routing
var redirectTo = '/';
var pathname = location.pathname;
if (pathname && pathname !== '/' && pathname !== '/index.html') {
redirectTo += pathname;
}
location.replace(redirectTo);
</script>
</head>
<body>
<p>Redirecting...</p>
</body>
</html>

View File

@@ -1,4 +1,4 @@
import React from 'react';
// import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import Navbar from './components/layout/Navbar';
import Footer from './components/layout/Footer';

View File

@@ -4,7 +4,7 @@ import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: '/',
base: '/snigdhaos-web-dev/', // Replace with your repository name
optimizeDeps: {
exclude: ['lucide-react'],
},