Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

start-compiler-plugin fails to lazy-load dependencies with Vite bundledDev

オープン 初心者向け
#8,407 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 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
  1. Use Vite 8.3.0 and @tanstack/start-plugin-core 1.171.39.
  2. Enable experimental: { bundledDev: true }.
  3. Add a lazy route with a createServerFn input validator using Zod.
  4. 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

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/router のほかの issue

TanStack/router の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。