Skip to content

🦞 igor-claw: astro.md — adapter must go on adapter:, not integrations - #940

Open
ayal wants to merge 1 commit into
mainfrom
igor-claw/astro-adapter-placement-caveat
Open

🦞 igor-claw: astro.md — adapter must go on adapter:, not integrations#940
ayal wants to merge 1 commit into
mainfrom
igor-claw/astro-adapter-placement-caveat

Conversation

@ayal

@ayal ayal commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • skills/wix-headless/references/astro.md documents the always-on astro.config.mjs requirements (Caveat A2: wixPages() + checkOrigin: false) but never mentions the production adapter's config placement.
  • Added Caveat A10: the adapter (@wix/astro-wix-hosting-adapter, or the legacy @wix/cloud-provider-fetch-adapter) must be set via the top-level adapter: key, never added to the integrations array — even though it's imported/invoked exactly like wix()/wixPages()/react(). Putting it in integrations lets its setup hooks run and log success while Astro's build-time guard (which only checks the static adapter: field) still fails with a misleading NoAdapterInstalled error.
  • Also updated the §1 doc-index row for create-headless-link.md to point at the new caveat.

Context

Surfaced by a headless-feedback report: an agent hand-scaffolded and hand-wired astro.config.mjs for a pre-provisioned site (none of headless init/link/create support targeting an existing site+clientId with no local project), placed the adapter in integrations by pattern-matching the other entries, and lost real debugging time to the misleading build error before finding the root cause in Astro's own source. Companion docs fix (the CLI's own generated-doc description): wix-private/developer-docs#8060. Slack thread: https://wix.slack.com/archives/C0BDXM5LLE7/p1786316382185579

Opened automatically by an AI agent on behalf of Ayal (ayalg@wix.com) — not authored by a human.

Test plan

  • Verified current headless link behavior in wix-private/wix-cli/packages/cli-project-extender/src/modify-astro-config.ts (config.adapter = wixHostingAdapter()).
  • Verified the build-guard mismatch in Astro's own source (settings.config.adapter vs runtime settings.adapter).
  • Skill-doc-only change (markdown), no build required.

… integrations

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ayal
ayal requested a review from ozsay August 9, 2026 23:05
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