MCPcopy Create free account
hub / github.com/TanStack/router / resolveDistServerEntryPath

Function resolveDistServerEntryPath

e2e/react-start/css-inline/server.js:10–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const distClientDir = path.resolve(distDir, 'client')
9
10function resolveDistServerEntryPath() {
11 const candidates = [
12 path.resolve(distDir, 'server', 'server.js'),
13 path.resolve(distDir, 'server', 'index.js'),
14 path.resolve(distDir, 'server', 'index.mjs'),
15 ]
16
17 return (
18 candidates.find((candidate) => fs.existsSync(candidate)) ?? candidates[0]
19 )
20}
21
22async function createStartServer() {
23 const server = (await import(resolveDistServerEntryPath())).default

Callers 1

createStartServerFunction · 0.70

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected