-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract workerd logic in mini-oxygen package #1891
Conversation
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
"@types/recursive-readdir": "^2.2.1", | ||
"@types/stack-trace": "^0.0.30", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is what you were saying yesterday, all of these deps can be removed from the CLI, which will make npm create @shopify/hydrogen
faster? And instead they are deps to the new package, which is a peer dep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. The main dependency here is miniflare
(123MB): https://pkg-size.dev/miniflare@3
Now this is only installed when doing npm i
in the template, not when the CLI is installed globally with npm create @shopify/hydrogen
.
const liveReload = shouldLiveReload | ||
? await setupLiveReload(remixConfig.dev?.port ?? 8002) | ||
: undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth being a part of the changeset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, this is only used in the tests to make them more robust (it failed if you already had a dev server up locally because port 8002 is occupied).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 👍 |
This PR moves shared logic related to workerd into
@shopify/mini-oxygen
. This package used to contain the Node.js sandbox logic and it was soft-deprecated. With these changes, it now contains both Node.js sandbox and workerd runtimes. Some of the benefits: