Skip to content

Commit

Permalink
build: configure base URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Oct 17, 2024
1 parent 6012831 commit 0f5d6f0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
run: npm ci

- name: Build
env:
BASE_URL: "/onboarding/"
run: npm run build

- name: Upload artifact for GitHub Pages
Expand Down
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@gemeente-denhaag/components-react": "^0.1.1-alpha.354",
"@nl-design-system-candidate/paragraph-react": "^1.0.0",
"@nl-design-system-unstable/nlds-design-tokens": "^1.0.0-alpha.290",
"@types/node": "^22.7.6",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@utrecht/component-library-react": "^7.1.0",
Expand Down
9 changes: 6 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";

const BASE_URL = (process as never) && process.env["BASE_URL"];

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
base: BASE_URL || "/",
});

0 comments on commit 0f5d6f0

Please sign in to comment.