start-compiler-plugin fails to lazy-load dependencies with Vite bundledDev
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript, vite
- 領域
- build-system
調査の方向性
Start コンパイラープラグインの loadViteModuleFromEnvironment から始め、説明されている lazy Zod バリデーターの設定と experimental.bundledDev を使って Vite 8.3.0 で再現します。bundled dev がプラグインの load フックを使用すること、また lazy ルートを開いても zod/index.js に対して “could not load module info” で失敗しなくなったことを確認します。
索引モデルが issue の本文から書いたものです。
説明
Which project does this relate to?
Start
Describe the bug
With Vite experimental.bundledDev, the Start compiler can fail while lazily inspecting a server-function dependency such as Zod.
Bundled environments still report environment.mode === "dev", so loadViteModuleFromEnvironment calls environment.transformRequest(). That path does not load arbitrary modules into Rolldown bundled dev. The compiler cache stays empty and lazy bundling fails with could not load module info.
Steps to reproduce
- Use Vite 8.3.0 and
@tanstack/start-plugin-core1.171.39. - Enable
experimental: { bundledDev: true }. - Add a lazy route with a
createServerFninput validator using Zod. - Open the route.
The lazy bundle fails while loading zod/index.js.
Expected behavior
Bundled dev should use the plugin load hook, like build mode does.
This change fixes the issue locally:
-if (environment.mode === "build") {
+if (environment.mode === "build" || environment.config.isBundled) {
Tested with Vite 8.3.0, Rolldown 1.2.6, React Start 1.168.49, and start-plugin-core 1.171.39.
Related bundled-dev reports: #7488 and #8062, but those cover CSS and HMR rather than compiler dependency loading.
- 主要言語
- TypeScript
- スター
- 15.1k
- フォーク
- 1.9k
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 134
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/router のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
information needed
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
TanStack/router#8464 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TanStack/router#8333 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
TanStack/router の issue をすべて見る
似ている issue
-
priority: P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
prime-radiant-inc/evener#3291 ·
メンテナーはふだん 1 日以内に返信
-
accessibility bug revealjs
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
quarto-dev/quarto-cli#14961 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
supabase/agent-skills#614 ·
-
Content
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
RunestoneInteractive/rs#1559 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信