MCPcopy
hub / github.com/freshframework/fresh / getAssetPath

Function getAssetPath

packages/plugin-vite/src/plugins/server_entry.ts:25–32  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

23 let isDev = false;
24
25 const getAssetPath = (id: string): string => {
26 if (basePath === "/") {
27 return `/${id}`;
28 }
29 // Ensure basePath ends with / and construct the path manually to avoid platform-specific path issues
30 const normalizedBase = basePath.endsWith("/") ? basePath : basePath + "/";
31 return normalizedBase + id;
32 };
33
34 return {
35 name: "fresh:server_entry",

Callers 1

writeBundleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected