Share services between `nitro/vite` and `nitro/rsbuild`
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript, vite
- 領域
- backend, build-system
調査の方向性
Start by comparing entry-server detection in src/build/vite/plugin.ts and src/build/rsbuild/_services.ts, then trace the Vite and Rsbuild runtime and virtual-module paths described in the issue. The proposal is complete when core resolves shared services, both integrations report service loading for development and production, and Rsbuild uses the shared runtime without breaking the Vite alias.
索引モデルが issue の本文から書いたものです。
説明
nitro/vite and nitro/rsbuild (#5011) both run server environments as services that Nitro fetches (e.g. ssr), but each one has its own config, runtime API and internals for the same model: a service is an ESM entry exporting fetch, it shares the nitro/* runtime of the server, and its output is bundled by Nitro in production.
Today:
- Config:
vite.servicesin Vite; nothing in Rsbuild (onlytarget: "node"environments). entry-serverdetection is duplicated (src/build/vite/plugin.ts,src/build/rsbuild/_services.ts), and only Vite checks that the server entry and the SSR entry differ.- Runtime:
fetchViteEnv()fromnitro/vite/runtimevsfetchRsbuildEnv()fromnitro/rsbuild/runtime. - Internals: separate services virtual modules (
#nitro/virtual/vite-services,#nitro/virtual/rsbuild-services) with the samelazyServicecode, separate dev globals, and separate default SSR renderer handlers and renderer selection.
Proposal (additive, no breaking change for nitro/vite):
- Top-level
servicesoption ({ [name]: { entry } }), resolved in core withentry-serverdetection and the entry conflict check.vite.servicesstays as an alias. - The integrations map
servicesto their environments and register auto-detected server environments back, then report how each service output is loaded (dev and prod). - Core generates one services virtual module, one SSR renderer handler and the default renderer selection.
- One runtime API, e.g.
fetchService(name, input, init?)fromnitro/services.fetchViteEnv()becomes an alias.
nitro/rsbuild would then use these instead of adding fetchRsbuildEnv().
🤖 Generated with AI assistant
- 主要言語
- TypeScript
- スター
- 11.5k
- フォーク
- 968
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 64
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nitrojs/nitro のほかの issue
-
pending triage
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 2 日以内に返信
-
cloudflare: `nitro deploy` fails when a parent directory has a Wrangler config対応中かも @draarivpatel-ui が 13 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 2 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
pending triage
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
nitrojs/nitro#5205 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
amosblomqvist/learnharness#1141 ·
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ranxianglei/billion-context#8319 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
tencent-connect/dsh-qqbot#148 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
JimLiu/open-artifact#126 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100