[Typo]: React Compiler Vite installation docs with "vite-plugin-babel" cause sourcemap issues
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 11.8k
- フォーク
- 7.9k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 11
説明
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:
Screenshot demonstrating sourcemaps not added when using the custom vite-plugin-babel:
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
React Compilerのインストールページと、リンクされているreact-vite-compiler-reproリポジトリから始めてください。カスタムVite Babelプラグインの設定とそのbabelConfigを調査し、報告されたsourcemapの差異がsourceMaps: trueによって解消されるかを確認してから、確認できた場合はインストール手順を更新してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- babel, javascript, react, vite
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100