Skip to content

Commit e818e76

Browse files
committed
Add changeset
1 parent 140a273 commit e818e76

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
'@shopify/hydrogen': minor
3+
'@shopify/cli-hydrogen': patch
4+
'@shopify/create-hydrogen': patch
5+
---
6+
7+
Remove `@shopify/remix-oxygen` package and migrate to React Router 7
8+
9+
This change removes the `@shopify/remix-oxygen` package as part of Hydrogen's migration from Remix to React Router 7 + Vite. The package had become a thin wrapper that mostly re-exported React Router functionality.
10+
11+
## Breaking Changes
12+
13+
The `@shopify/remix-oxygen` package has been removed. Update your imports:
14+
15+
**Before:**
16+
```typescript
17+
import {LoaderFunctionArgs, redirect} from '@shopify/remix-oxygen';
18+
import {createRequestHandler} from '@shopify/remix-oxygen';
19+
```
20+
21+
**After:**
22+
```typescript
23+
import {LoaderFunctionArgs, redirect} from 'react-router';
24+
import {createRequestHandler} from '@shopify/hydrogen/oxygen';
25+
```
26+
27+
## What's Changed
28+
29+
- **Type exports**: All types like `LoaderFunctionArgs`, `ActionFunctionArgs`, `HeadersFunction`, etc. are now imported directly from `react-router`
30+
- **Utility functions**: Functions like `redirect`, `json`, and `defer` are now imported from `react-router`
31+
- **Request handler**: The `createRequestHandler` function for Oxygen deployments is now available from `@shopify/hydrogen/oxygen`
32+
- **Storefront headers**: The `getStorefrontHeaders` utility is now exported from `@shopify/hydrogen`
33+
34+
## Migration Required
35+
36+
All projects using `@shopify/remix-oxygen` need to update their imports. The skeleton template and examples have been updated to use the new import paths.
37+
38+
The functionality remains the same - this is primarily an import path change to align with React Router 7 and reduce unnecessary abstraction layers.

0 commit comments

Comments
 (0)