-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Ensure there is only one oclif/core version. Update to CLI 3.48 * Update Remix dependencies to 1.19.1 * Add Remix logger and mute uneeded warnings * Remove import of deprecated type and merge imports * Fix linting * Another lint fix * Changesets * Changesets * Find nearest free port * Add HMR logic from Remix * Enable HMR with future.unstable_dev flag * HMR working * Update to ESM version of MiniOxygen * HDR working with changes to MiniOxygen * Enable v2_dev in templates and examples * Cleanup * Update MiniOxygen to support HDR * Add LiveReload component to templates and examples * Changesets * Move get-port to dependencies --------- Co-authored-by: Bret Little <bret.little@shopify.com>
- Loading branch information
Showing
19 changed files
with
2,088 additions
and
3,181 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,69 @@ | ||
--- | ||
'@shopify/cli-hydrogen': minor | ||
'@shopify/demo-store': minor | ||
--- | ||
|
||
Support Remix Hot Module Replacement (HMR) and Hot Data Revalidation (HDR). | ||
Start using it with the following changes to your project: | ||
|
||
1. Upgrade to the latest Hydrogen version and Remix 1.19.1. | ||
|
||
2. Enable the v2 dev server in `remix.config.js`: | ||
|
||
```diff | ||
// ... | ||
future: { | ||
+ v2_dev: true, | ||
v2_meta: true, | ||
v2_headers: true, | ||
// ... | ||
} | ||
``` | ||
|
||
3. Add Remix' `<LiveReload />` component if you don't have it to your `root.jsx` or `root.tsx` file: | ||
|
||
```diff | ||
import { | ||
Outlet, | ||
Scripts, | ||
+ LiveReload, | ||
ScrollRestoration, | ||
} from '@remix-run/react'; | ||
|
||
// ... | ||
|
||
export default function App() { | ||
// ... | ||
|
||
return ( | ||
<html> | ||
<head> | ||
{/* ... */} | ||
</head> | ||
<body> | ||
<Outlet /> | ||
<ScrollRestoration /> | ||
<Scripts /> | ||
+ <LiveReload /> | ||
</body> | ||
</html> | ||
); | ||
} | ||
|
||
export function ErrorBoundary() { | ||
// ... | ||
|
||
return ( | ||
<html> | ||
<head> | ||
{/* ... */} | ||
</head> | ||
<body> | ||
Error! | ||
<Scripts /> | ||
+ <LiveReload /> | ||
</body> | ||
</html> | ||
); | ||
} | ||
``` |
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 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
Oops, something went wrong.