MCPcopy Index your code
hub / github.com/TanStack/router / configureServer

Function configureServer

packages/start-plugin-core/src/plugin.ts:410–421  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

408 {
409 name: 'tanstack-start-core:dev-base-rewrite',
410 configureServer(server) {
411 if (!needsDevBaseRewrite) {
412 return
413 }
414 const basePrefix = resolvedStartConfig.viteAppBase.replace(/\/$/, '')
415 server.middlewares.use((req, _res, next) => {
416 if (req.url && !req.url.startsWith(basePrefix)) {
417 req.url = basePrefix + req.url
418 }
419 next()
420 })
421 },
422 },
423 devServerPlugin({
424 getConfig,

Callers

nothing calls this directly

Calls 3

startsWithMethod · 0.80
replaceMethod · 0.65
nextFunction · 0.50

Tested by

no test coverage detected