Update skeleton for standalone Oxygen workflow#3820
Draft
frandiox wants to merge 14 commits into
Draft
Conversation
Allow the Oxygen Vite plugin to work without Hydrogen registering all deployment defaults. The plugin now defaults the Vite build output to dist, infers an Oxygen compatibility date from the resolved @Shopify/hydrogen package when no date is registered, and falls back to 2026-04-01 for non-calver Hydrogen versions. Keep explicit compatibility dates registered by the Hydrogen plugin authoritative, and add focused coverage for default build options, inferred oxygen.json emission, explicit-date precedence, and graceful metadata failures. Co-authored-by: Codex <codex@openai.com> Assisted-By: devx/cfcff76e-c93f-4252-a696-0009d08d7009
Add Hydrogen deploy flags for explicit client assets and worker output directories, and resolve deploy directories from flags, Vite output, then dist fallbacks. Use the package build script via node --run build for custom output deployments and 0.0.0-preview Hydrogen versions so those projects do not go through the Hydrogen runBuild hook. Keep explicit --build-command values authoritative. Co-authored-by: Codex <codex@openai.com>
Prefer Vite's environment-specific SSR and client output directories when resolving deploy output paths, then fall back to the existing server-to-client naming convention. Expand the CLI changeset to describe Vite output detection and the node --run build fallback for standalone output deployments. Co-authored-by: Codex <codex@openai.com>
Stop forcing a dist build output from the Mini Oxygen Vite plugin, while keeping compatibility-date inference self-contained. Preserve configured worker entry module IDs for SSR build fallback, including virtual and package IDs, and prepend a clearer Mini Oxygen response when Vite cannot load the configured worker entry. Co-authored-by: Codex <codex@openai.com>
Move worker-specific resolve conditions out of the top-level Vite resolver so client modules keep normal browser conditions. Keep helper error text out of the dev worker entry runtime exports so Miniflare only sees the default handler. Co-authored-by: Codex <codex@openai.com>
Regenerate the OCLIF manifest so the deploy command exposes the new assets and worker directory flags plus the updated build-command description. Co-authored-by: Codex <codex@openai.com>
Keep the missing-entry message private to the worker entry and hardcode the expected text in the test instead of adding a shared helper module. Co-authored-by: Codex <codex@openai.com>
Remove the remaining missing-entry message constant and assert the literal text directly in worker entry tests. Co-authored-by: Codex <codex@openai.com>
Prevent the Mini Oxygen Vite plugin from writing oxygen.json during client builds so the metadata only lands with the server worker output. Update tests and the changeset accordingly. Co-authored-by: Codex <codex@openai.com>
Run vite preview through Mini Oxygen by creating a preview runtime from the built worker output, with previewEntry support and default server entry discovery. Move the shared Miniflare request conversion into Vite utilities and cover the preview output resolution paths in tests. Co-authored-by: OpenAI <noreply@openai.com>
Load Vite environment variables for standalone Mini Oxygen dev and preview when no env bindings are provided by plugin options or the Hydrogen CLI. Skip the fallback when env or envPromise is registered, preserving CLI-provided bindings. Co-authored-by: OpenAI <codex@openai.com>
Co-authored-by: OpenAI <codex@openai.com>
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
This reverts commit ae28577.
Use Vite and React Router commands directly in the skeleton template, and remove the Hydrogen plugin/preset dependency from the local runtime path so the template exercises Mini Oxygen standalone behavior. Co-authored-by: OpenAI <codex@openai.com>
6ad2f61 to
368c483
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just for testing:
To test: you'll need
shopify hydrogen env pullif you want to get the env vars from the linked store, since it doesn't run through the CLI anymore to get the variables automatically.