-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add extra logic to select env var style depending on bundler (vite or…
… parcel) (#50)
- Loading branch information
1 parent
4aba26b
commit 73c237a
Showing
2 changed files
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`; |
73c237a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://webz-demo.netlify.app as production
🚀 Deployed on https://672c4dbcb965b8e024a8c510--webz-demo.netlify.app