fix(build): incorrect specifier with file:// islands (#3157)

This commit is contained in:
Marvin Hagemeister
2025-07-31 09:23:15 +02:00
committed by GitHub
parent f87d2180fb
commit b898548e95
7 changed files with 172 additions and 9 deletions
+3 -3
View File
@@ -369,7 +369,7 @@ import staticFileData from "./static-files.json" with { type: "json" };
${
islands
.map((item) => {
const spec = pathToSpec(path.relative(outDir, item.server));
const spec = pathToSpec(outDir, item.server);
return `import * as ${item.name} from "${spec}";`;
})
.join("\n")
@@ -380,7 +380,7 @@ ${
this.#fsRoutes.files
.map((item, i) => {
if (item.lazy) return null;
const spec = pathToSpec(path.relative(outDir, item.filePath));
const spec = pathToSpec(outDir, item.filePath);
return `import * as fsRoute_${i} from "${spec}"`;
})
.filter(Boolean)
@@ -423,7 +423,7 @@ ${
let mod = "";
if (item.lazy) {
const spec = pathToSpec(path.relative(outDir, item.filePath));
const spec = pathToSpec(outDir, item.filePath);
mod = `() => import(${JSON.stringify(spec)})`;
} else {
mod = `fsRoute_${i}`;