Skip to content

[vite-plugin] Backport caller-owned Container guidance to v1 - #16334

Open
petebacondarwin wants to merge 3 commits into
codex/vite-v1-backport-16307from
codex/vite-v1-backport-16225
Open

petebacondarwin wants to merge 3 commits into
codex/vite-v1-backport-16307from
codex/vite-v1-backport-16225

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Backport #16225 to Vite plugin v1, stacked on #16333, so Container setup instructions use the appropriate registry command and configuration location in both dev and preview.

Preserve v1's per-Worker image planning and legacy configuration filenames. For inline configuration, use the actual Vite configuration filename when available, or describe the Vite plugin configuration when there is no file. Use cloudflare.config.ts only for the experimental new-config mode; preview uses its generated Worker configuration. Keep the experimental cf delegate's registry command. Regression coverage includes real inline-config dev and build/preview servers; the two fileless-guidance cases fail against the old helper.

Pin published containers-shared 0.23.0 in the plugin and deploy-helpers 0.22.0 in private remote-bindings, with a regenerated lockfile. #16333 supplies the coupled Miniflare, Wrangler, workerd, Workers types, and runtime-types versions; no runtime bump is repeated or reverted. Retain all private workspace packages and references, and keep absent public sibling source out of v1. This original retains its own adaptation, tests, and plugin patch changeset.

Validation on Node.js 22.22.1 / pnpm 10.33.0: this PR passes build (3 tasks), all retained unit tasks (8 tasks, 282 plugin tests), and all repository checks (60 tasks). The final stack additionally passes offline frozen installation and 285 plugin tests. Cross-platform CI and maintainer review remain required.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: this maintains existing v1 behavior with compatible released SDK dependencies.

Note

This is a contribution from an AI agent: Codex, GPT-6, preparing maintainer-requested v1 backports.

@petebacondarwin petebacondarwin added blocked Blocked on other work dependencies Used by dependabot to mark PRs as updates to dependencies. package:vite-plugin Relating to the `@cloudflare/vite-plugin` package labels Oct 17, 2026
@changeset-bot

changeset-bot Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 98b8c2f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/vite-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@petebacondarwin

Copy link
Copy Markdown
Contributor Author

@dario-piotrowicz (author of #16225) and @edmundhung (verified human ant-core approver), could you please check this vite-plugin-v1 backport and approve it when it is ready and looks good?

The adaptation preserves v1's per-Worker Container planning and legacy configuration filenames while passing caller-owned registry guidance from both dev and preview. Public Container/deployment helper source stays absent; the manifests pin the pending releases instead. Earlier backport #16333 supplies the coupled Miniflare, Wrangler, and runtime-types versions, without repeating or reverting those bumps here. This draft awaits npm publication and final dependency/build/type/test validation, as detailed in the description.

@petebacondarwin
petebacondarwin force-pushed the codex/vite-v1-backport-16225 branch from 3866994 to 1319581 Compare October 18, 2026 12:57
@petebacondarwin
petebacondarwin added this pull request to stack #16347 October 18, 2026 14:03
@petebacondarwin
petebacondarwin force-pushed the codex/vite-v1-backport-16225 branch from 1319581 to d911fb2 Compare October 19, 2026 10:56
@petebacondarwin petebacondarwin removed the blocked Blocked on other work label Oct 19, 2026
@petebacondarwin
petebacondarwin marked this pull request as ready for review October 19, 2026 10:56
@pkg-pr-new

pkg-pr-new Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/@cloudflare/vite-plugin@16334

commit: 98b8c2f

@workers-devprod
workers-devprod requested review from a team and jamesopstad and removed request for a team October 19, 2026 10:56
@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler

devin-ai-integration[bot]

This comment was marked as resolved.

@clanky-the-clanker

clanky-the-clanker Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Approved — No issues found. The backport picks the Container setup guidance's config filename and registry command in the order the description gives, and the dependency pins are exact and match the lockfile.

The decision is advisory: this comment never approves, blocks or requests changes on the pull request.


✅ All checks passed

🚀 Release: ✅ LGTM

Risk: Low. The pull request pins @cloudflare/containers-shared to 0.23.0 in the plugin and @cloudflare/deploy-helpers to 0.22.0 in remote-bindings. Both are exact pins, and a plugin patch changeset is included.


🔒 Security: ✅ LGTM

No security issues in the changed code.


📖 AGENTS.md: ✅ LGTM

The change follows the repository guidelines:

  • Public SDK packages are pinned to exact published versions.
  • Private workspace dependencies stay as workspace:* references.
  • Built-in imports use node:path.
  • A plugin changeset is included.

📋 Code Quality: ✅ LGTM

I found no defects in the changed code.

  • Config filename: prepareContainerImagesForVite (containers.ts) picks the name in this order:

    1. the Worker's configPath basename
    2. cloudflare.config.ts, only in experimental new-config mode
    3. the Vite config filename
    4. "Vite plugin configuration" when there is no file

    This matches the PR description.

  • Registry command: the experimental cf delegate (cliDisplayName === "cf") gets cf containers registries create. Everything else gets wrangler containers registries configure.

  • Inputs: dev.ts and preview.ts pass cliDisplayName and experimental.newConfig from the resolved plugin config, and both values are set there.

  • Tests: the unit test covers the config filename combinations. The server tests cover real inline-config dev and preview runs.

  • Not checked: this review could not confirm that prepareContainerImagesForDev in @cloudflare/containers-shared 0.23.0 accepts the configFileName and registryConfigureCommand options, because that package's source is not in the repository. The new tests assert on those option names.


⚡ Performance: ✅ LGTM

No performance issues in the changed code.


📝 Documentation: ✅ LGTM

The plugin changeset is present and describes the user-facing change.


Reviewed commit: 98b8c2fb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Used by dependabot to mark PRs as updates to dependencies. package:vite-plugin Relating to the `@cloudflare/vite-plugin` package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants