Skip to content

Commit

Permalink
Bugfix: Hash Routing
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiah-carlson committed Sep 10, 2023
1 parent 91ca897 commit f86a9a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/deploy-gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Deploy GitHub Pages
on: workflow_dispatch

env:
HASH_ROUTING: true

jobs:
# Build job
build:
Expand All @@ -16,6 +13,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: mv .env.github .env
- run: npm install .
- run: npm run build
- uses: actions/upload-pages-artifact@v2
Expand Down
1 change: 1 addition & 0 deletions www/.env.github
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_ROUTING=hash
2 changes: 1 addition & 1 deletion www/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
);
}

const routerSrc = (import.meta.env['HASH_ROUTING'] == true)? hashIntegration() : null;
const routerSrc = (["hash", "HASH"].includes(import.meta.env.VITE_ROUTING))? hashIntegration() : null;

render(() => (
<Router source={routerSrc}>
Expand Down

0 comments on commit f86a9a9

Please sign in to comment.