MCPcopy Create free account
hub / github.com/bailicangdu/react-pxq / getServedPath

Function getServedPath

config/paths.js:43–48  ·  view source on GitHub ↗
(appPackageJson)

Source from the content-addressed store, hash-verified

41// We can't use a relative path in HTML because we don't want to load something
42// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
43function getServedPath(appPackageJson) {
44 const publicUrl = getPublicUrl(appPackageJson);
45 const servedUrl =
46 envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/');
47 return ensureSlash(servedUrl, true);
48}
49
50
51

Callers 1

paths.jsFile · 0.85

Calls 2

getPublicUrlFunction · 0.85
ensureSlashFunction · 0.85

Tested by

no test coverage detected