Dev manifest loses lazy CSS when imported before HTTP startup
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- build-system
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 522
- Fork
- 72
- Merge medio
- 1g 5h
- PR unite (30g)
- 34
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di solidjs/solid-vite-plugin
-
Test environment detection doesn't consider Vitest workspacesForse già presa @carloitaben l’ha presa 53 giorni fa. Aperta2.x
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
solidjs/solid-vite-plugin#205 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 34/100
solidjs/solid-vite-plugin#415 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
solidjs/solid-vite-plugin#369 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
solidjs/solid-vite-plugin#328 ·
I maintainer di solito rispondono entro 1 giorno
-
Retain $ServerOnly templates while HMR is activeForse già presa @brenelz l’ha presa 27 giorni fa. Aperta2.x
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
solidjs/solid-vite-plugin#308 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di solidjs/solid-vite-plugin
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
homarr-labs/homarr#7191 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
AvaProtocol/ava-sdk-js#276 ·
I maintainer di solito rispondono entro 1 giorno
-
useFragment does not require `variables` when the fragment's variables type has required fieldsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apollographql/apollo-client#13493 ·
I maintainer di solito rispondono entro 1 giorno