|
1 | 1 | # @shopify/create-hydrogen
|
2 | 2 |
|
| 3 | +## 5.0.15 |
| 4 | + |
| 5 | +### Patch Changes |
| 6 | + |
| 7 | +- Workaround for "Error: failed to execute 'insertBefore' on 'Node'" that sometimes happen during development. ([#2701](https://github.com/Shopify/hydrogen/pull/2701)) by [@wizardlyhel](https://github.com/wizardlyhel) |
| 8 | + |
| 9 | + ```diff |
| 10 | + // root.tsx |
| 11 | + |
| 12 | + /** |
| 13 | + * The main and reset stylesheets are added in the Layout component |
| 14 | + * to prevent a bug in development HMR updates. |
| 15 | + * |
| 16 | + * This avoids the "failed to execute 'insertBefore' on 'Node'" error |
| 17 | + * that occurs after editing and navigating to another page. |
| 18 | + * |
| 19 | + * It's a temporary fix until the issue is resolved. |
| 20 | + * https://github.com/remix-run/remix/issues/9242 |
| 21 | + */ |
| 22 | + export function links() { |
| 23 | + return [ |
| 24 | + - {rel: 'stylesheet', href: resetStyles}, |
| 25 | + - {rel: 'stylesheet', href: appStyles}, |
| 26 | + { |
| 27 | + rel: 'preconnect', |
| 28 | + href: 'https://cdn.shopify.com', |
| 29 | + }, |
| 30 | + { |
| 31 | + rel: 'preconnect', |
| 32 | + href: 'https://shop.app', |
| 33 | + }, |
| 34 | + {rel: 'icon', type: 'image/svg+xml', href: favicon}, |
| 35 | + ]; |
| 36 | + } |
| 37 | + |
| 38 | + ... |
| 39 | + |
| 40 | + export function Layout({children}: {children?: React.ReactNode}) { |
| 41 | + const nonce = useNonce(); |
| 42 | + const data = useRouteLoaderData<RootLoader>('root'); |
| 43 | + |
| 44 | + return ( |
| 45 | + <html lang="en"> |
| 46 | + <head> |
| 47 | + <meta charSet="utf-8" /> |
| 48 | + <meta name="viewport" content="width=device-width,initial-scale=1" /> |
| 49 | + + <link rel="stylesheet" href={resetStyles}></link> |
| 50 | + + <link rel="stylesheet" href={appStyles}></link> |
| 51 | + |
| 52 | + ``` |
| 53 | + |
| 54 | +- Bump SFAPI to 2025-01 ([#2715](https://github.com/Shopify/hydrogen/pull/2715)) by [@rbshop](https://github.com/rbshop) |
| 55 | + |
3 | 56 | ## 5.0.14
|
4 | 57 |
|
5 | 58 | ### Patch Changes
|
|
0 commit comments