Conversation
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
| @@ -1,4 +1,4 @@ | |||
| // Virtual entry point for the app | |||
| import * as serverBuild from 'virtual:react-router/server-build'; | |||
| import {createRequestHandler, storefrontRedirect} from '@shopify/hydrogen'; | |||
There was a problem hiding this comment.
for some reason the published version of @shopify/hydrogen does not export createRequestHandler (https://www.npmjs.com/package/@shopify/hydrogen/v/0.0.0-next-d9cd83b-20250521171221?activeTab=code)
i can see it was published a while ago, so maybe there was some caching or CI issues
the local version of the package works as expected (packages/hydrogen/dist/production/index.d.ts)
we might need to publish a patch if we intend on using this
i would:
- revert this change to the skeleton and revert o using
import {createRequestHandler} from '@shopify/hydrogen/oxygen'(easier, hotfixy) - investigate why the build did not include that, maybe it’s a change made and not released?
- isolate the skeleton’s
node_modulesin to ensure it does not use packages from the monorepo but instead from the published versions to avoid this kind of skew (tradeoff: cant ship new features and use them in the same PR) - un-revert change to skeleton, import as is in the original code
There was a problem hiding this comment.
for some reason the published version of @shopify/hydrogen does not export createRequestHandler (https://www.npmjs.com/package/@shopify/hydrogen/v/0.0.0-next-d9cd83b-20250521171221?activeTab=code)
I think that's normal, we haven't released the new version yet. Why is that a problem though? New projects scaffolded via CLI should still use the old version 🤔
The server build entry import was modified in the RR7 upgrade PR to be a dynamic import. I'm not sure why since it works as a static import as well. I've excluded this from ESLint to fix the errors.
🔴 Using a dynamic import means Vite needs to process your app code at runtime during the first request from your browser, which delays page rendering by a couple of seconds (you see a blank page for a while):
🟢 While a static import can be discovered by Vite earlier and preloaded in parallel to other work before your browser even opens: