Repository navigation
fix(nextjs-config): snapshot sourcemap inputs for Turbopack - #4691
kkumarsatish567-dot wants to merge 2 commits into
Conversation
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
|
Still actively interested in getting this fix reviewed. The PR is ready from my side; the current Actions runs are showing |
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
|
Still active. The PR remains draft because the current Actions runs are still |
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
|
hey @kkumarsatish567-dot, thanks for the pull request! sorry for the delayed response here, we typically don't look into pull requests until they're marked ready for review. i've run CI for your branch. just a heads up - this will also require a changeset and your commits to be signed in order for us to approve and merge. please take a look at CONTRIBUTING.md for more information. |
|
thanks again for working on this! i'd missed that we'd already resolved #4667 through a CLI fix in PostHog/posthog#91427, adopted in #4737 and released in the CLI now uploads the same source pairs it injected, so we no longer need to snapshot file paths in the next.js integration. i'll close this as superseded, but feel free to re-open unless i've missed something! |
Problem
Fixes #4667.
Next.js 16.3+ can continue flushing Turbopack's filesystem cache after
runAfterProductionCompilestarts.@posthog/nextjs-configcurrently passes the entire.nextdirectory toposthog-cli sourcemap process, so the CLI can observe one set of chunks during injection and a larger set during upload. Chunks created between those scans have no injected chunk ID and can fail the production build withChunk ID not found.Changes
.js/.mjs/.cjs, empty-output, and missing-output cases.This avoids timing sleeps/retries and keeps the fix local to the integration lifecycle race.
Testing
CI requested via this draft PR. The focused unit tests are in
packages/nextjs-config/src/utils.spec.ts.Type