Skip to content

Update skeleton for standalone Oxygen workflow#3820

Draft
frandiox wants to merge 14 commits into
mainfrom
fd-skeleton-oxygen-standalone
Draft

Update skeleton for standalone Oxygen workflow#3820
frandiox wants to merge 14 commits into
mainfrom
fd-skeleton-oxygen-standalone

Conversation

@frandiox

@frandiox frandiox commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Just for testing:

  • switch the skeleton template to run dev/build/preview through Vite and React Router directly
  • remove the Hydrogen Vite plugin and React Router preset from the skeleton runtime path
  • keep Mini Oxygen as the Oxygen runtime integration point for standalone local workflows

To test: you'll need shopify hydrogen env pull if 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.

frandiox and others added 12 commits June 24, 2026 18:10
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>
@shopify

shopify Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Oxygen deployed a preview of your fd-skeleton-oxygen-standalone branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment June 25, 2026 4:47 PM

Learn more about Hydrogen's GitHub integration.

frandiox and others added 2 commits June 26, 2026 01:45
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>
@frandiox frandiox force-pushed the fd-skeleton-oxygen-standalone branch from 6ad2f61 to 368c483 Compare June 25, 2026 16:45
Base automatically changed from fd-standalone-oxygen-deployment to main June 30, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant