MCPcopy
hub / github.com/nuxt/nuxt / resolveServer

Function resolveServer

packages/vite/src/plugins/vite-node.ts:278–295  ·  view source on GitHub ↗
(ssrServer: ViteDevServer)

Source from the content-addressed store, hash-verified

276 }
277
278 function resolveServer (ssrServer: ViteDevServer) {
279 const viteNodeServerOptions = {
280 socketPath,
281 root: nuxt.options.srcDir,
282 entryPath: spaEntryPath ?? resolveServerEntry(ssrServer.config),
283 base: '/',
284 maxRetryAttempts: nuxt.options.vite.viteNode?.maxRetryAttempts,
285 baseRetryDelay: nuxt.options.vite.viteNode?.baseRetryDelay,
286 maxRetryDelay: nuxt.options.vite.viteNode?.maxRetryDelay,
287 requestTimeout: nuxt.options.vite.viteNode?.requestTimeout,
288 // TODO: remove baseURL in future
289 baseURL: nuxt.options.devServer.url,
290 }
291
292 process.env.NUXT_VITE_NODE_OPTIONS = JSON.stringify(viteNodeServerOptions)
293
294 socketServer = createViteNodeSocketServer(nuxt, ssrServer, clientServer, invalidates, () => collectInvalidatedSsrModules(ssrServer), viteNodeServerOptions)
295 }
296
297 if (nuxt.options.experimental.viteEnvironmentApi || !nuxt.options.ssr) {
298 resolveServer(clientServer)

Callers 1

configureServerFunction · 0.85

Calls 3

resolveServerEntryFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…