File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!doctype html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 " />
5+ < link rel ="icon " href ="/vite.svg " />
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
7+ < title > Vite + React</ title >
8+ < link
9+ rel ="stylesheet "
10+ href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css "
11+ />
12+ </ head >
13+ < body >
14+ < div id ="root "> </ div >
15+ < script type ="module " src ="/src/main.jsx "> </ script >
16+ </ body >
17+ </ html >
Original file line number Diff line number Diff line change 55 "type" : " module" ,
66 "homepage" : " https://darshankumargp.github.io/CodeVerse/" ,
77 "scripts" : {
8- "dev" : " vite" ,
8+ "dev" : " copy index.local.html index.html && vite" ,
99 "build" : " vite build" ,
1010 "lint" : " eslint ." ,
1111 "preview" : " vite preview" ,
1212 "predeploy" : " npm run build" ,
13- "deploy" : " gh-pages -d dist"
13+ "prepare-deploy" : " copy dist\\ index.html index.html" ,
14+ "deploy" : " npm run prepare-deploy && gh-pages -d dist"
1415 },
1516 "dependencies" : {
1617 "framer-motion" : " ^12.23.6" ,
Original file line number Diff line number Diff line change 11import React from 'react'
22import ReactDOM from 'react-dom/client'
3- import { HashRouter } from 'react-router-dom' // <-- change here
3+ import { HashRouter } from 'react-router-dom'
44import App from './App.jsx'
55import './index.css'
66
Original file line number Diff line number Diff line change 11import { defineConfig } from 'vite'
22import react from '@vitejs/plugin-react'
33
4- export default defineConfig ( {
5- plugins : [ react ( ) ] ,
6- base : '/CodeVerse/' ,
4+ export default defineConfig ( ( { command } ) => {
5+ return {
6+ plugins : [ react ( ) ] ,
7+ base : command === 'build' ? './' : '/' ,
8+ }
79} )
You can’t perform that action at this time.
0 commit comments