Skip to content

fix(wallet): bundle @walletconnect/logger to fix SSR named export error#5664

Open
Khizr97 wants to merge 1 commit into
chore/khizr-fixes-2from
chore/khizr-fixes-2-REOWN-4396
Open

fix(wallet): bundle @walletconnect/logger to fix SSR named export error#5664
Khizr97 wants to merge 1 commit into
chore/khizr-fixes-2from
chore/khizr-fixes-2-REOWN-4396

Conversation

@Khizr97
Copy link
Copy Markdown
Contributor

@Khizr97 Khizr97 commented May 12, 2026

Summary

  • @reown/appkit-wallet previously used tsc --build only, which left @walletconnect/logger as a raw runtime import in dist/esm/
  • Vite SSR (SvelteKit, Next.js) externalizes the dependency; Node.js then resolves the CJS version, causing SyntaxError: Named export 'generateChildLogger' not found on Vercel and similar SSR environments
  • This was a regression introduced in 1.8.10 when @walletconnect/logger was bumped from 2.1.23.0.0 (which added an exports map that changed how Vite handles SSR bundling)
  • Fix adds a Vite library build step that inlines @walletconnect/logger into the dist output — same pattern as @reown/appkit-cdn

Test plan

  • @walletconnect/logger import no longer present anywhere in dist/esm/ after build
  • Node.js ESM direct import of dist/esm/exports/index.js succeeds without CJS/ESM error (simulates Vercel SSR runtime)
  • All 27 existing unit tests pass
  • Changeset included

Closes REOWN-4396

🤖 Generated with Claude Code

Adds a vite library build step to @reown/appkit-wallet so @walletconnect/logger
is inlined into the dist output. Previously the tsc-only build left it as a
runtime import; Vite SSR (SvelteKit, Next.js) would externalize it and Node.js
would resolve the CJS version, causing "Named export not found" errors on Vercel.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear Bot commented May 12, 2026

REOWN-4396

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
appkit-demo Error Error May 12, 2026 0:49am
appkit-gallery Error Error Comment May 12, 2026 0:49am
appkit-headless-sample-app Error Error May 12, 2026 0:49am
appkit-laboratory Error Error Comment May 12, 2026 0:49am
9 Skipped Deployments
Project Deployment Actions Updated (UTC)
appkit-basic-example Ignored Ignored May 12, 2026 0:49am
appkit-basic-sign-client-example Ignored Ignored May 12, 2026 0:49am
appkit-basic-up-example Ignored Ignored May 12, 2026 0:49am
appkit-ethers5-bera Ignored Ignored May 12, 2026 0:49am
appkit-nansen-demo Ignored Ignored May 12, 2026 0:49am
appkit-wagmi-cdn-example Ignored Ignored May 12, 2026 0:49am
ethereum-provider-wagmi-example Ignored Ignored May 12, 2026 0:49am
next-wagmi-solana-bitcoin-example Ignored Ignored May 12, 2026 0:49am
vue-wagmi-example Ignored Ignored May 12, 2026 0:49am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 12, 2026

🦋 Changeset detected

Latest commit: fd8434d

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

This PR includes changesets to release 26 packages
Name Type
@reown/appkit-wallet Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit Patch
@reown/appkit-ui Patch
@reown/appkit-controllers Patch
@reown/appkit-utils Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-siwe Patch
@reown/appkit-cdn Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ton Patch
@reown/appkit-adapter-tron Patch
@reown/appkit-universal-connector Patch
@reown/appkit-experimental Patch
@reown/appkit-testing Patch
@reown/appkit-wallet-button Patch
@reown/appkit-pay Patch
@reown/appkit-core Patch
@reown/appkit-siwx Patch
@reown/appkit-common Patch
@reown/appkit-polyfills Patch
@reown/appkit-cli Patch
@reown/appkit-codemod 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

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