fix(vite): partial island loading (#3226)

This commit is contained in:
Marvin Hagemeister
2025-08-19 17:58:17 +02:00
committed by GitHub
parent afdf5eaf6c
commit ffa57be765
6 changed files with 98 additions and 1 deletions
@@ -142,10 +142,16 @@ export function serverSnapshot(options: ResolvedFreshViteConfig): Plugin[] {
const mod = manifest[id];
const serverPath = path.join(root, mod.src ?? id);
let spec = pathToSpec(clientOutDir, mod.file);
if (spec.startsWith("./")) {
spec = spec.slice(1);
}
const name = namer.getUniqueName(specToName(id));
islandMods.push({
name,
browser: pathToSpec(clientOutDir, mod.file),
browser: spec,
server: serverPath,
});
}