Skip to content

fix(vue): scope Nuxt runtime auto-import exports to composables#5009

Open
theamodhshetty wants to merge 2 commits intowevm:mainfrom
theamodhshetty:codex/fix-nuxt-autoimport-composables
Open

fix(vue): scope Nuxt runtime auto-import exports to composables#5009
theamodhshetty wants to merge 2 commits intowevm:mainfrom
theamodhshetty:codex/fix-nuxt-autoimport-composables

Conversation

@theamodhshetty
Copy link
Copy Markdown

Summary

Fixes Nuxt auto-import failures in @wagmi/vue by narrowing the Nuxt runtime composables entrypoint to composable exports only.

Problem

packages/vue/src/nuxt/runtime/composables.ts re-exported ../../exports/index.js, which also includes plugin/core utility exports. In Nuxt auto-import paths, this can pull in module interop that triggers:
eventemitter3 ... does not provide an export named 'default'.

Changes

  • Replaced broad re-export with explicit composable-only exports in the Nuxt runtime entrypoint.
  • Preserved deprecated alias names used by the Nuxt module (useAccount, useAccountEffect, useSwitchAccount) via explicit alias exports.
  • Added regression test to assert Nuxt runtime entrypoint only exposes the intended auto-import composables.

Tests

  • pnpm vitest run packages/vue/src/nuxt/runtime/composables.test.ts packages/vue/src/exports/nuxt.test.ts
  • pnpm biome check packages/vue/src/nuxt/runtime/composables.ts packages/vue/src/nuxt/runtime/composables.test.ts

Closes #3977.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 23, 2026

🦋 Changeset detected

Latest commit: 1b745ae

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

This PR includes changesets to release 1 package
Name Type
@wagmi/vue 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

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 23, 2026

@theamodhshetty is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@theamodhshetty
Copy link
Copy Markdown
Author

Small implementation note: I kept the deprecated aliases (useAccount, useAccountEffect, useSwitchAccount) in the Nuxt runtime entrypoint by aliasing from the canonical composables, so Nuxt auto-import behavior remains compatible while narrowing the export surface.

@theamodhshetty
Copy link
Copy Markdown
Author

Quick follow-up update:

  • added a changeset for this PR (@wagmi/vue patch) in commit 1b745aec

The remaining failing checks are both Vercel authorization gates for the Wevm team, so they should pass once team authorization is granted.

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.

autoimport Nuxt eventemitter3 does not provide an export named 'default'

1 participant