Skip to content

Commit febded0

Browse files
committed
fix pages
1 parent 145a767 commit febded0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

web/frontend/vite.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ import { fileURLToPath, URL } from 'node:url'
33
import vue from '@vitejs/plugin-vue'
44
import { defineConfig } from 'vite'
55

6+
const repositoryName = process.env.GITHUB_REPOSITORY?.split('/')[1]
7+
const defaultBasePath = repositoryName ? `/${repositoryName}/` : '/'
8+
69
// https://vite.dev/config/
710
export default defineConfig({
8-
base: process.env.VITE_BASE_PATH || '/codingsnake/',
11+
base: process.env.VITE_BASE_PATH || defaultBasePath,
912
plugins: [vue()],
1013
resolve: {
1114
alias: {

0 commit comments

Comments
 (0)