Skip to content

fix: support Nuxt 5 - #675

Open
onmax wants to merge 1 commit into
nuxt-modules:v5from
onmax:agent/nuxt-5-compat
Open

fix: support Nuxt 5#675
onmax wants to merge 1 commit into
nuxt-modules:v5from
onmax:agent/nuxt-5-compat

Conversation

@onmax

@onmax onmax commented Jul 24, 2026

Copy link
Copy Markdown

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This updates the module compatibility range for Nuxt 5 and makes GraphQL Vite plugin registration idempotent.

Nuxt 5 invokes Vite configuration more than once. The module previously created and appended a new GraphQL plugin each time, so the second plugin tried to parse the JavaScript generated by the first plugin as GraphQL. Reusing one plugin instance and adding it only when it is absent preserves the existing Nuxt 4 path while allowing .gql imports to build on Nuxt 5/Nitro 3.

✅ Checks

  • pnpm lint
  • pnpm build
  • pnpm dev:build (Nuxt 4.0.2 / Nitro 2.12.4)
  • Clean consumer build with the packed module artifact and Nuxt 4.5.0 / Nitro 2.13.4
  • Clean consumer build with the packed module artifact and Nuxt 5.0.0-0 / Nitro 3.0.260610-beta from Nuxt main via pkg.pr.new

@netlify

netlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

👷 Deploy request for apollo-module pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 8d913d0

@onmax
onmax marked this pull request as ready for review July 24, 2026 08:35
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