Skip to content

Commit

Permalink
Update base path using environment variable in vite.config
Browse files Browse the repository at this point in the history
  • Loading branch information
THORSTEN SCHMINKEL committed Feb 11, 2024
1 parent e497ca1 commit cd73dfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BASE_PATH=/react-shopping-cart-client-only/
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
base: "/react-shopping-cart-client-only/",
base: import.meta.env.BASE_PATH,
plugins: [react()],
})

0 comments on commit cd73dfd

Please sign in to comment.