Skip to content

Unify snapshot paths #3513

@marvinhagemeister

Description

@marvinhagemeister

From https://discord.com/channels/684898665143206084/991511118524715139/1423328498042278041

the weirdest/hardest one was windows paths being "hardcoded" into the built bundle

return `${EDIT_WARNING}
import { IslandPreparer } from "fresh/internal";
${islandImports}
${fsRouteImports}
export const clientEntry = ${JSON.stringify(options.clientEntry)}
export const version = ${JSON.stringify(options.buildId)}
export const islands = new Map();
const islandPreparer = new IslandPreparer();
${islandMarkers}
export const staticFiles = new Map([
${
staticFiles.map((def) =>
` [${JSON.stringify(def.name)}, ${JSON.stringify(def)}]`
).join(",\n")
}
]);
export const entryAssets = [${entryAssets}];
export const fsRoutes = [
${serializedFsRoutes}
];
`.replaceAll(/\n[\n]+/g, "\n\n");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions