forked from Shopify/hydrogen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reload environment variables in development (Shopify#997)
* Load env vars in parallel to initial build; Do not throw on env var errors * Reload env variables when project is linked to storefront * Wrap all calls in try-catch * Resolve variables in parallel and avoid crashing on fetch fail * Add .env to Remix watcher in templates * Changesets
- Loading branch information
Showing
12 changed files
with
207 additions
and
128 deletions.
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,10 @@ | ||
--- | ||
'demo-store': patch | ||
--- | ||
|
||
Add `.env` file to Remix watcher to allow reloading environment variables on file save. In `remix.config.js`: | ||
|
||
```diff | ||
-watchPaths: ['./public'], | ||
+watchPaths: ['./public', './.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@shopify/cli-hydrogen': minor | ||
--- | ||
|
||
Reload environment variables in the development server when `.env` file is updated. Show injected variables when project is not linked to any storefront. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.