Skip to content

Conversation

@ibrahimcesar
Copy link
Owner

Updated tsconfig.json to use the new JSX transform (react-jsx) instead of the legacy transform (react). This aligns TypeScript's compilation with Vite's @vitejs/plugin-react which uses the new JSX transform by default.

This fixes the module resolution issue where the build output correctly imports from 'react/jsx-runtime' (marked as external in vite.config.ts) but TypeScript was configured for the old transform.

Changes:

  • tsconfig.json: Changed "jsx": "react" to "jsx": "react-jsx"

Benefits:

  • Eliminates JSX transform mismatch between TypeScript and Vite
  • Aligns with React 17+ best practices
  • Maintains backward compatibility (source still imports React)
  • All 51 tests passing ✅

Updated tsconfig.json to use the new JSX transform (react-jsx) instead
of the legacy transform (react). This aligns TypeScript's compilation
with Vite's @vitejs/plugin-react which uses the new JSX transform by
default.

This fixes the module resolution issue where the build output correctly
imports from 'react/jsx-runtime' (marked as external in vite.config.ts)
but TypeScript was configured for the old transform.

Changes:
- tsconfig.json: Changed "jsx": "react" to "jsx": "react-jsx"

Benefits:
- Eliminates JSX transform mismatch between TypeScript and Vite
- Aligns with React 17+ best practices
- Maintains backward compatibility (source still imports React)
- All 51 tests passing ✅
@ibrahimcesar ibrahimcesar merged commit e60f853 into main Nov 15, 2025
6 of 7 checks passed
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
ES Module 2.99 KB (0%)
CommonJS 2.96 KB (0%)
CSS 1.05 KB (0%)

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.

3 participants