change the react refresh url from `/@refresh-runtime`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- react, typescript, vite
調査の方向性
まず packages/plugin-react、packages/plugin-react-swc、packages/plugin-react-oxc の refresh-runtime の処理を調べ、次に Sec-Fetch-Dest ヘッダーなしで /@{username} のような SSR ルートとの競合を再現します。完了条件は、確認したプラグイン全体で React refresh リクエストがアプリケーションのルートと競合しなくなり、dev モードでもクライアント側の JavaScript が引き続き読み込まれることです。
索引モデルが issue の本文から書いたものです。
説明
Related plugins
Description
in our application (tanstack start), there is an ssr route on /@{username} to show a user's profile, and the vite react plugin uses /@react-refresh without any trailing data. this causes the routes to conflict.
we never noticed this, because on localhost the browser sends Sec-Fetch-Dest: script, which vite uses to resolve the conflict. but in my current bug search, i am using the site from my phone in dev-mode, using the non-localhost http://169.254.x.x, which will not send these headers. the app now fails to run any client-side javascript since the script fetches "404 user not found" as HTML.
Suggested solution
- change
/@refresh-runtimeto something else harder to collide with- perhaps
/node_modules/@vitejs/plugin-react/dist/refresh-runtime.jsto better reflect where the file is coming from - changeable with a configuration (my initial thought but i think the detailed path is better
- perhaps
Alternative
perhaps it should be configurable in vite to add a full prefix to the specifiers.
Additional context
i have a workaround (deleting the profile page temporarily) but would love this for coworkers that may need to perform a similar type of debug.
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- 主要言語
- TypeScript
- スター
- 1.2k
- フォーク
- 287
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 21
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vitejs/vite-plugin-react のほかの issue
-
plugin-rsc: a client reference's CSS is linked before the CSS of the chunks it imports (build)対応中かも @wozhenbang2004 が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
vitejs/vite-plugin-react#1570 ·
メンテナーはふだん 1 日以内に返信
-
[plugin-rsc] With two dev servers in one process, loadModule runs in the last server's environmentオープン
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
vitejs/vite-plugin-react#1589 ·
メンテナーはふだん 1 日以内に返信
-
pending triage
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
vitejs/vite-plugin-react#1581 ·
メンテナーはふだん 1 日以内に返信
-
[plugin-rsc] Build exits 0, but the app fails at runtime: a server action imported only by browser code is missing from the RSC build対応中かも @NeilPant が 4 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
vitejs/vite-plugin-react#1578 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
vitejs/vite-plugin-react#1577 ·
メンテナーはふだん 1 日以内に返信
vitejs/vite-plugin-react の issue をすべて見る
似ている issue
-
bug from-app needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nightly-labs/openbot#18462 ·
メンテナーはふだん 1 日以内に返信
-
Fast and light shell approval "Always allow" button shows raw English backticks and scrambles commands in Arabic対応中かも @tylerbea が今日担当しました。 オープンagent-ui bug p3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[Bug] Windows: Ctrl+C / Ctrl+V not working in chat input box対応中かも @PranavTJ-05 が今日担当しました。 オープンcomp/desktop desktop/chat desktop/shell os/windows P2 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
NousResearch/hermes-agent#161023 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
resources
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
railmapgen/rmg-templates#2703 ·
メンテナーはふだん 1 日以内に返信
-
TypeScript OSS: `huggingfaceBaseUrl` is dropped by config validation, so the documented HuggingFace embedder example throws対応中かも @jaisogani-ai が今日担当しました。 オープンbug sdk-typescript
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信