Skip to content

Commit

Permalink
fix: Util env
Browse files Browse the repository at this point in the history
  • Loading branch information
Aldemylla committed Mar 25, 2024
1 parent 9d907f5 commit bb0c4fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export default function env(name) {
return import.meta.env[name] || window?.configs?.[name];
return import.meta.env[name] ||
window?.configs?.[name] ||
process.env[name] ||
window?.configs?.[`VITE_${name}`] ||
process.env[`VITE_${name}`];
}

0 comments on commit bb0c4fa

Please sign in to comment.