Skip to content

chore(examples): fix vite-project-react-swc type check on lingui v6 - #2749

Merged
andrii-bodnar merged 1 commit into
mainfrom
chore/vite-react-swc-example-tsconfig
Oct 27, 2026
Merged

andrii-bodnar merged 1 commit into
mainfrom
chore/vite-react-swc-example-tsconfig

Conversation

@andrii-bodnar

Copy link
Copy Markdown
Contributor

Description

yarn build runs tsc first, and it failed with TS2307 for every @lingui/* import: Lingui v6 ships its types only through exports, which moduleResolution: "Node" doesn't read. Switch to "bundler" (needs TypeScript 5), and bump @types/react / @types/react-dom to 18.3 so Trans and Plural (which return ReactNode) type-check as JSX components.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Examples update

Checklist

  • I have read the CONTRIBUTING and CODE_OF_CONDUCT docs
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

`yarn build` runs `tsc` first, and it failed with TS2307 for every
`@lingui/*` import: Lingui v6 ships its types only through `exports`,
which `moduleResolution: "Node"` doesn't read. Switch to `"bundler"`
(needs TypeScript 5), and bump `@types/react` / `@types/react-dom` to
18.3 so `Trans` and `Plural` (which return `ReactNode`) type-check as
JSX components.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
js-lingui Ready Ready Preview Oct 27, 2026 8:05am UTC

Request Review

@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
packages/core/dist/index.mjs 1.85 KB (0%)
packages/detect-locale/dist/index.mjs 652 B (0%)
packages/react/dist/index.mjs 1.92 KB (0%)

@andrii-bodnar
andrii-bodnar merged commit 57fa67c into main Oct 27, 2026
10 checks passed
@andrii-bodnar
andrii-bodnar deleted the chore/vite-react-swc-example-tsconfig branch October 27, 2026 10:42

This branch was successfully deployed

1 active deployment
Preview — 3a384646 Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant