Skip to content

Commit 2bdd4b3

Browse files
committed
Fix Vite configuration for GitHub Pages deployment
- Fix alias path resolution using __dirname - Add path import for proper alias resolution - Copy vite.svg to root for proper icon loading This should resolve the 404 errors for /src/main.ts and /vite.svg when the app is deployed to GitHub Pages.
1 parent 23c7051 commit 2bdd4b3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { defineConfig } from 'vite'
22
import vue from '@vitejs/plugin-vue'
3+
import { resolve } from 'path'
34

45
export default defineConfig({
56
plugins: [vue()],
67
resolve: {
78
alias: {
8-
'@': '/src'
9+
'@': resolve(__dirname, 'src')
910
}
1011
},
1112
base: '/vue-tetris/',

vite.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)