Skip to content

Commit

Permalink
add extra logic to select env var style depending on bundler (vite or…
Browse files Browse the repository at this point in the history
… parcel) (#50)
  • Loading branch information
willemolding authored Nov 7, 2024
1 parent 4aba26b commit 73c237a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/demo-wallet/src/config/env_selector.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// support the env var style for both Vite and Parcel
export const env = import.meta.env || process.env;
4 changes: 3 additions & 1 deletion packages/demo-wallet/src/config/snap.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { env } from './env_selector';

export const defaultSnapOrigin =
// eslint-disable-next-line no-restricted-globals
import.meta.env.SNAP_ORIGIN ?? `local:http://localhost:8080`;
env.SNAP_ORIGIN ?? `local:http://localhost:8080`;

1 comment on commit 73c237a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.