Skip to content

Commit

Permalink
fix: add VITE_CONFIG_BASE env var to set BASE in vite.config.ts (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
oxcabe committed Apr 1, 2024
1 parent 168e718 commit b4e1a47
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
run: pnpm build:pages
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"type": "module",
"scripts": {
"build": "tsc && vite build",
"build:pages": "tsc && VITE_CONFIG_BASE='/SIMDE/' vite build",
"check": "biome check --apply ./src",
"dev": "vite",
"docs": "typedoc src/index.ts --excludePrivate --mode file --theme minimal --out build/docs",
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import tsconfigPaths from 'vite-tsconfig-paths'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), tsconfigPaths()],
base: "/SIMDE/"
base: process.env.VITE_CONFIG_BASE ?? "/",
})

0 comments on commit b4e1a47

Please sign in to comment.