Skip to content

Support modern bundler imports and prepare v3.2.4 - #230

Merged
infeng merged 1 commit into
masterfrom
codex/fix-modern-package-export
Aug 21, 2026
Merged

Support modern bundler imports and prepare v3.2.4#230
infeng merged 1 commit into
masterfrom
codex/fix-modern-package-export

Conversation

@infeng

@infeng infeng commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • export the Viewer component directly from the UMD package entry so documented default imports work in modern bundlers
  • update the Next.js client-only example to unwrap the CommonJS default explicitly
  • add a release verification check for the built package export
  • bump the patch version to 3.2.4

Related to #198. This does not add server-side Viewer rendering; the documented client-only Next.js integration remains required.

Reproduction

The 3.2.3 tarball built successfully with current tools, but default imports resolved to a module object at runtime. React 19/Vite 8 reported an invalid element type, and Next.js 16 reported React error 306.

Validation

  • npm run verify
  • public npm registry scan
  • React 19.2.8 + Vite 8.2.2 production build
  • Next.js 16.3.1 + React 19.2.8 production build with a statically prerendered App Router page
  • Chromium 149.0.7827.55: both fixtures hydrated, opened Viewer, loaded an image, and closed with Escape without page errors
  • npm pack dry run for react-viewer@3.2.4

@infeng
infeng marked this pull request as ready for review August 21, 2026 03:32
@infeng
infeng merged commit b13d165 into master Aug 21, 2026
2 checks passed
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