diff --git a/.github/workflows/vite-gh-pages.yml b/.github/workflows/vite-gh-pages.yml index 97cbc0b..a212a4f 100644 --- a/.github/workflows/vite-gh-pages.yml +++ b/.github/workflows/vite-gh-pages.yml @@ -26,6 +26,7 @@ jobs: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} + VITE_BASE: /portfolio/ runs-on: ubuntu-latest steps: - name: Checkout diff --git a/package-lock.json b/package-lock.json index 8d85280..1e78baa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "react-dom": "^18.2.0" }, "devDependencies": { + "@types/node": "^20.2.5", "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", "@vitejs/plugin-react-swc": "^3.0.0", @@ -596,6 +597,12 @@ "node": ">=10" } }, + "node_modules/@types/node": { + "version": "20.2.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz", + "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==", + "dev": true + }, "node_modules/@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", diff --git a/package.json b/package.json index e12f6c3..6030ed5 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "react-dom": "^18.2.0" }, "devDependencies": { + "@types/node": "^20.2.5", "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", "@vitejs/plugin-react-swc": "^3.0.0", diff --git a/vite.config.ts b/vite.config.ts index 861b04b..09b3286 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,5 +3,6 @@ import react from '@vitejs/plugin-react-swc' // https://vitejs.dev/config/ export default defineConfig({ + base: process.env.VITE_BASE, plugins: [react()], })