Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Dev manifest loses lazy CSS when imported before HTTP startup

Ouverte
#414 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
typescript
Domaine
build-system

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
522
Forks
72
Merge moyen
1 j 5 h
PR mergées (30 j)
34

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de solidjs/solid-vite-plugin

Toutes les issues de solidjs/solid-vite-plugin

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.