mirror of
https://github.com/Snigdha-OS/snigdhaos-web-dev.git
synced 2025-09-08 13:54:57 +02:00
IDK
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "snigdha-os-website",
|
"name": "snigdhaos-web-dev",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"homepage": "https://snigdha-os.github.io/snigdhaos-web-dev",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
20
public/404.html
Normal file
20
public/404.html
Normal 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>
|
@@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
// import React from 'react';
|
||||||
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
||||||
import Navbar from './components/layout/Navbar';
|
import Navbar from './components/layout/Navbar';
|
||||||
import Footer from './components/layout/Footer';
|
import Footer from './components/layout/Footer';
|
||||||
|
@@ -4,7 +4,7 @@ import react from '@vitejs/plugin-react';
|
|||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
base: '/',
|
base: '/snigdhaos-web-dev/', // Replace with your repository name
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
exclude: ['lucide-react'],
|
exclude: ['lucide-react'],
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user