TypeScript99.5%
JavaScript0.5%

Commit activity

Last 12 weeks · 3 commits

Full graph →

Community health

3 of 6 standards met

Community profile →
75
✓README✓License✓Contributing○Code of Conduct○Issue Template○PR Template
tobiaslins

rebuilds everything on every request: it parses (jsonc) it validates the whole config, which compiles every path it builds the application objects it compiles each flagged path again with With vercel-site's config (20 applications, 366 paths, 4 flags), this is ~2.5ms of CPU per request. It ran on every proxied request. In a local profile of a real vercel-site session, the proxy chunk was ~13.5% of all server CPU, and this was most of it. Change The parsed config and the compiled path patterns are cached in a single entry, keyed by the env they're derived from: the and overrides A change to any of these rebuilds the entry. Override cookies () are not part of the key. They only change application hosts, which the middleware never reads. The Vercel proxy and the local proxy apply overrides. The well-known client config only contains hashed application names and routing. So the middleware's output was already the same with or without override cookies. still accepts for backwards compatibility, but no longer reads it. is not part of the cache. It is applied on every request, because callers (including the examples) often create a new object inside the middleware function. Things that stay per request: flag evaluation the header A missing flag function still throws on every request. The env part of the key is reused while the env is unchanged, so the lookup doesn't hash the 10KB config string on each request. is unchanged: it still runs the list returned by , so the routing logic exists in one place. builds new entries from the cached routing on each call, each with its own copy of the pattern. Callers that change the entries don't affect the cache. With vercel-site's 8 flagged paths, building the entries per request costs about 0.001 ms. Numbers Benchmark: vercel-site's with 5 representative paths and 20 regular cookies, Node 22. Tests New tests check that the config is parsed once across requests, including when each request passes a new object. They also check that the config is rebuilt when it changes, and is not rebuilt when only override cookies change. Another test changes the entries returned by and checks that later requests are unaffected. 🤖 Generated with Claude Code

tobiaslins · 7h ago
kitfoster

Summary forward origin-form request targets directly through http-proxy avoid Node.js DEP0169 warnings for HTTP and WebSocket proxy traffic add regression assertions and a patch changeset Testing pnpm checks -F @vercel/microfrontends pnpm dev:nextjs-app (30-second startup smoke test) pnpm dev:nextjs-pages (30-second startup smoke test)

kitfoster · 1w ago
swarnava

Send the resolved local proxy origin in the proxy-owned request header for local HTTP targets, HTTPS fallback deployments, and WebSocket upgrades. This gives fallback applications a stable origin that is not overwritten with x-forwarded-host at the Vercel edge.

swarnava · 3w ago
Structured data for AI agents

Repository: vercel/microfrontends. Description: Build microfrontends on Vercel Stars: 45, Forks: 10. Primary language: TypeScript. Languages: TypeScript (99.5%), JavaScript (0.5%). License: MIT. Homepage: https://vercel.com/docs/microfrontends Topics: micro-frontends, microfrontends, multi-zones, nextjs, react, sveltekit, vercel, vite. Latest release: @vercel/microfrontends@2.4.2 (6h ago). Open PRs: 4, open issues: 0. Last activity: 6h ago. Community health: 75%. Top contributors: kitfoster, vercel-release-bot, tim123abc, mknichel, tomdale, rvnewolf, jamesvclements, plmrry, tobiaslins, tonypan2 and others.