Skip to content

docs: fix alternative Vite configuration for TypeScript users#8460

Open
ayushgade06 wants to merge 1 commit into
reactjs:mainfrom
ayushgade06:fix/vite-compiler-docs
Open

docs: fix alternative Vite configuration for TypeScript users#8460
ayushgade06 wants to merge 1 commit into
reactjs:mainfrom
ayushgade06:fix/vite-compiler-docs

Conversation

@ayushgade06
Copy link
Copy Markdown

Description

Fixes #8148

This PR updates the alternative Vite configuration section within installation.md to utilize vite-plugin-babel instead of @rolldown/plugin-babel.

Changes Made

  • Switched the configuration example to use vite-plugin-babel to properly leverage the filter regular expression and custom babelConfig block.
  • Added the explicit filter: /\.[jt]sx?$/ property so Vite properly captures .ts and .tsx files instead of silently ignoring them.
  • Included the ["@babel/preset-typescript"] preset configuration block so the compiler can parse modern TypeScript syntax seamlessly.
  • Updated the accompanying sentence right above the code snippet to correctly reference vite-plugin-babel.
  • Adjusted markdown code-block line highlighting to match the newly added line configurations ({6,12-14}).

Verification

  • Successfully verified the documentation layout logic locally.
  • Ran yarn check-all to ensure all format checks, linting rules, and TypeScript type compliance pass cleanly with zero structural errors.

@github-actions
Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

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.

[Typo]: The alternative way to configure react compiler with vitejs doesn't work

1 participant