Skip to content

Commit

Permalink
ci: set base vite.config option
Browse files Browse the repository at this point in the history
  • Loading branch information
sripwoud committed Feb 17, 2025
1 parent 256d299 commit 77c54a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion web/src/lib/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ import { createRouter } from '@tanstack/react-router'
import { NotFound as defaultNotFoundComponent } from 'components/NotFound'
import { routeTree } from 'routeTree.gen'

export const router = createRouter({ defaultNotFoundComponent, routeTree })
export const router = createRouter({
basepath: '/web-app-template',
defaultNotFoundComponent,
routeTree,
})
7 changes: 6 additions & 1 deletion web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ import tsconfigPaths from 'vite-tsconfig-paths'
const plugins = [tsconfigPaths(), TanStackRouterVite(), react()]

export default defineConfig(({ mode }) => {
return { plugins, server: { open: mode === 'development' } }
return {
// https://vite.dev/guide/static-deploy#github-pages
base: '/web-app-template/',
plugins,
server: { open: mode === 'development' },
}
})

0 comments on commit 77c54a4

Please sign in to comment.