Repository navigation
fix(workers): stop cf deploy mis-detecting froq-api as Hydrogen - #38
Merged
Merged
Conversation
Root vite.config.ts from the vp-config migration is visible from workers/froq-api, so Cloudflare autoconfig reports Hydrogen + Nuxt and fails in Workers Builds CI. Declaring vite on the API package makes Vite outrank that false positive; cf then treats Vite as auxiliary and keeps Nuxt as the site framework.
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
0froq
marked this pull request as ready for review
October 26, 2026 18:51
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.
Problem
Workers Builds production for
froqfails onpnpm exec cf deployafter the #37 vp-config squash (414e360).pnpm generatesucceeds; deploy dies immediately with:cfstill runs@netlify/build-infoframework detection even whencloudflare.config.tsexists. Hydrogen listsvite.config.tsas a config file and treats a config-only match as a detection. #37 added a rootvite.config.tsfor Vite+ lint/fmt; fromworkers/froq-apithat file is found byfindUp, so the API package is reported as Hydrogen. Nuxt at the repo root is the other hit. In CI both are “known” frameworks, so autoconfig throws. Product code is unchanged; lig does not have aworkers/package, which is why the samevite.config.tspattern is safe there.Fix
Do not revert #37. Declare
viteas aworkers/froq-apidevDependency (remapped by the existingvite@*→vite-plus-coreoverride). Vite then outranks the Hydrogen false positive on that package. Cloudflare autoconfig treats Vite as auxiliary when paired with Nuxt, so root site deploy stays Nuxt + Wrangler assets (dist/).froq-apiitself still deploys withpnpm --dir workers/froq-api deploy/ Wrangler.Verification
No Cloudflare credentials in this environment. Checks that prove the auto-detect clash is gone:
CI=true pnpm exec cf deploy --dry-runon main → Hydrogen + Nuxt.vite.config.ts→ detection passed andcfdelegated to Wrangler (then failed only on missingdist/). Restored the file.dist/index.html:CI=true pnpm exec cf deploy --dry-run→ Wrangler build + “Dry run complete”, no framework error.pnpm --dir workers/froq-api exec wrangler deploy --dry-runstill packages the API worker.pnpm install --frozen-lockfilesucceeds.Residual risk: a real deploy still needs Workers Builds credentials and a full
pnpm generatedist/. Detection now resolves to a single site framework (Nuxt); if another known non-auxiliary framework is added to the workspace, autoconfig could fail again.viteis unused by froq-api runtime — documented inwrangler.toml.