Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Typo]: React Compiler Vite installation docs with "vite-plugin-babel" cause sourcemap issues #8215

Open
@andrew-locklair-fs

Description

Summary

When following the setup instructions for React Compiler on the current live docs site, if using a custom Vite Babel plugin + React SWC or React Router v7 framework mode, you will notice that if a component gets optimized by React Compiler, the sourcemaps appear to have some React Compiler-optimized code paths in them, making dev debugging more difficult.

Page

https://react.dev/learn/react-compiler/installation

Details

Please see reproduction repository for specific details: https://github.com/andrew-locklair-fs/react-vite-compiler-repro

Screenshot demonstrating sourcemaps appropriately added with default config:

Image

Screenshot demonstrating sourcemaps not added when using the custom vite-plugin-babel:

Image

Happy to dig into this more, but hoping that it's as simple as just turning the relevant sourcemaps option ON for the custom Vite Babel plugin. I ran into this converting a RRv7 framework mode repo to add React Compiler, and the instructions seem to leave out sourceMaps: true in babelConfig.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /