next.js
6cc8eda3 - Keep Node.js assets out of Go proxy adapter output (#102806)

Commit
1 day ago
Keep Node.js assets out of Go proxy adapter output (#102806) ### What? Go proxy outputs now contain only assets and hashes from their native trace. Node.js outputs continue to include their shared runtime assets. ### Why? `proxy.go` was inheriting the Node.js bootstrap stub, the build directory's `package.json`, and the compiled instrumentation hook and its dependencies. Go proxies do not use these files. Their presence also prevents adapters from packaging a Go proxy as a container function, which cannot ship separate files. See [the downstream adapter workaround](https://github.com/nextjs/adapter-vercel/pull/179). ### How? Load the native proxy trace as before, but do not merge the shared Node.js assets or hashes into it. Extend the existing Go proxy adapter test with a Node.js instrumentation hook and verify the Go output has no extra assets while its executable and matchers still work. ### Verification - Confirmed the regression assertion failed before the fix: the Go proxy output had five Node.js assets, including instrumentation chunks. It passed after the fix, including with Cache Components enabled. - Ran the native Go proxy and Node.js package-boundary suites with `pnpm test-start-turbo`: 68 passed, 2 dev-only tests skipped. - Next.js build, Prettier, and ESLint passed for the change. <!-- NEXT_JS_LLM --> Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com> Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
Author
Parents
Loading