Skip to content

Commit

Permalink
Merge pull request #19 from sfuosdev/fix/issue-18/vite-config
Browse files Browse the repository at this point in the history
Complete issue 18 by adjusting Vite Config to handle dev and prod
  • Loading branch information
TommyOh0428 authored Nov 26, 2024
2 parents 74c0aa5 + 7f7131d commit 403a65c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

8 changes: 7 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({ base: "/{your-repo-name}", plugins: [react()], })
export default defineConfig(({ mode }) => {
const base = mode === "production" ? "/Website/" : "/";
return {
base,
plugins: [react()],
};
});

0 comments on commit 403a65c

Please sign in to comment.