Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Dev manifest loses lazy CSS when imported before HTTP startup

未關閉
#414 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@everton-dgn 已經在處理了。

開始於 2026年10月14日。

  • #416 來自 @everton-dgn —— 未關閉
  • #417 來自 @everton-dgn —— 未關閉

評估

難度
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:

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
分支
73
平均合併
1 天 5 小時
30 天內合併 PR
34

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

solidjs/solid-vite-plugin 的其他 Issue

查看 solidjs/solid-vite-plugin 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。