Skip to content

Commit dc71ef0

Browse files
committed
Refactor HTML structure, update Vite configuration for local deployment, and remove unused scripts from package.json
1 parent 7e9f2ee commit dc71ef0

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
lines changed

index.html

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Akhil Devarasetty | CSE Student & Developer</title>
8-
<meta name="description" content="Personal website of Akhil Devarasetty - Computer Science and Engineering Student">
9-
</head>
10-
<body>
11-
<div id="root"></div>
12-
<script type="module" src="/src/main.tsx"></script>
13-
</body>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Akhil Devarasetty</title>
7+
<!-- Preload JS with proper type -->
8+
<link rel="modulepreload" href="./src/main.tsx" as="script" type="text/javascript" />
9+
</head>
10+
<body>
11+
<div id="root"></div>
12+
<script type="module" src="./src/main.tsx"></script>
13+
</body>
1414
</html>

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7-
"predeploy" : "npm run build",
8-
"deploy" : "gh-pages -d dist",
97
"dev": "vite",
108
"build": "tsc && vite build",
119
"lint": "eslint .",

vite.config.ts

+13-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,21 @@ import react from '@vitejs/plugin-react';
33
import { plugin as markdown } from 'vite-plugin-markdown';
44

55
export default defineConfig({
6-
base: '/DDH2004.github.io/', // Add this line with your repo name
6+
base: './', // Change from '/DDH2004.github.io/' to './'
77
plugins: [
88
react(),
99
markdown({
10-
mode: 'html' // Using just html mode to avoid TypeScript errors
10+
mode: 'html'
1111
})
12-
]
12+
],
13+
build: {
14+
rollupOptions: {
15+
output: {
16+
// Ensure proper extensions for all files
17+
entryFileNames: 'assets/[name]-[hash].js',
18+
chunkFileNames: 'assets/[name]-[hash].js',
19+
assetFileNames: 'assets/[name]-[hash].[ext]'
20+
}
21+
}
22+
}
1323
});

0 commit comments

Comments
 (0)