Skip to content

Commit

Permalink
fix: 🐛 add env vars config for vite
Browse files Browse the repository at this point in the history
  • Loading branch information
kavabunga committed Jan 27, 2024
1 parent 33881b4 commit 6d596de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
interface ImportMetaEnv {
VITE_API_URL: string;
VITE_BASE_URL: string;
NODE_ENV: string;
VITE_JWT_SECRET: string;
VITE_PORT: string;
Expand Down
4 changes: 4 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ export default defineConfig({
},
},
plugins: [react(), svgr()],
define: {
VITE_BASE_URL: process.env.VITE_BASE_URL,
VITE_API_URL: process.env.VITE_API_URL,
},
});

0 comments on commit 6d596de

Please sign in to comment.