Skip to content

Commit

Permalink
refactor: use vite env import
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh authored and stdavis committed Nov 29, 2024
1 parent 9deeef0 commit 16898ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (!process.env.VITE_DATABASE_CONFIG) {
if (!import.meta.env.VITE_DATABASE_CONFIG) {
throw new Error('VITE_DATABASE_CONFIG must be set in .env');
}
const databaseSecrets: { databaseName: string; user: string } = JSON.parse(process.env.VITE_DATABASE_CONFIG);
const databaseSecrets: { databaseName: string; user: string } = JSON.parse(import.meta.env.VITE_DATABASE_CONFIG);

const config = {
MIN_DESKTOP_WIDTH: 768,
Expand Down

0 comments on commit 16898ca

Please sign in to comment.