Dev manifest loses lazy CSS when imported before HTTP startup
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- build-system
調査の方向性
Start with devManifestBridgeUrl() and the code that generates virtual:solid-manifest, and find where it falls back to the JS-only manifest when the bridge URL is null. Use the reproduction in the issue: create the server with Vite's createServer(), delay server.listen() until the manifest is requested, then fetch with Accept: text/html and check whether the lazy CSS is included. Done means the manifest resolves the bridge URL lazily, so the lazy CSS appears even when the manifest loads before listening, and it handles a port change or a server closed before listening.
索引モデルが issue の本文から書いたものです。
説明
With Nitro's Vite integration, the server runner can import virtual:solid-manifest before the HTTP server starts listening. devManifestBridgeUrl() returns null at that point, and the generated manifest keeps the JS-only fallback for the rest of the session.
The page renders successfully, but CSS imported by a lazy component is missing from the SSR response. The browser adds it during hydration, causing a visible layout change.
Reproduced with:
@solidjs/[email protected][email protected]and@solidjs/[email protected][email protected][email protected], Node 24, macOS
The relevant manifest code is unchanged in 3.0.0-next.50.
A small app is enough:
// src/App.tsx
import { lazy } from 'solid-js';
const Page = lazy(() => import('./Page.tsx'), undefined, 'src/Page.tsx');
export default function App() {
return <Page />;
}
// src/Page.tsx
import './page.css';
export default function Page() {
return <div class="bridge_probe">Nitro manifest probe</div>;
}
/* src/page.css */
.bridge_probe { font-size: 18px; }
Configure solid({ ssr: true, start: { devtools: false } }) and nitro({ serverEntry: false }).
To reproduce the startup ordering consistently, create the server through Vite's createServer() API and delay server.listen() until Nitro has requested virtual:solid-manifest. A preceding plugin's load hook can observe that request. Then start listening and fetch the page with Accept: text/html.
Actual result: HTTP 200, page content present, lazy CSS absent. Delaying the manifest load until the HTTP server is listening makes the same request include the CSS.
The bridge URL should remain usable when an external runner loads the manifest before the first request. The fix also needs to handle Vite choosing another port and closing the server before it starts listening.
- 主要言語
- TypeScript
- スター
- 522
- フォーク
- 72
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 34
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
solidjs/solid-vite-plugin のほかの issue
-
Test environment detection doesn't consider Vitest workspaces対応中かも @carloitaben が 53 日前に担当しました。 オープン2.x
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
solidjs/solid-vite-plugin#205 · コメント 1 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 34/100
solidjs/solid-vite-plugin#415 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
solidjs/solid-vite-plugin#369 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
solidjs/solid-vite-plugin#328 ·
メンテナーはふだん 1 日以内に返信
-
Retain $ServerOnly templates while HMR is active対応中かも @brenelz が 27 日前に担当しました。 オープン2.x
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
solidjs/solid-vite-plugin#308 ·
メンテナーはふだん 1 日以内に返信
solidjs/solid-vite-plugin の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
homarr-labs/homarr#7191 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AvaProtocol/ava-sdk-js#276 ·
メンテナーはふだん 1 日以内に返信
-
useFragment does not require `variables` when the fragment's variables type has required fieldsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apollographql/apollo-client#13493 ·
メンテナーはふだん 1 日以内に返信