next.js
a62b7d06 - Revert "Revert "[turbopack] Set `liveness` of exports based on assignment analysis (#82802)"" (#87214)

Commit
37 days ago
Revert "Revert "[turbopack] Set `liveness` of exports based on assignment analysis (#82802)"" (#87214) This reverts commit 7c8f84712020d388fb64ae5845a67cc370798115 which reverted ba227046ef42a8080b1fbe274fe842c0c7067bff. It was reverted because it triggered a bug in the payloadcms system which relied on distinguishing between server components and client references based on whether or not the `Function.prototype.name` property was the empty string. This was fixed in https://github.com/payloadcms/payload/pull/13931 which has now been released for a while. The triggering issue was that this PR gives SWC more opportunities to delete function names and thus functions become anonymous. The effect can also be seen in some of the snapshot updates. The original PR description was: Use the analysis added in #82763 to annotate exports as 'live' or 'const' This triggers previously implemented support to then bind the resulting values as 'readonly values' instead of getter functions. This helps with both code size and execution time since parsing/allocating even these tiny getter functions is not free.
Author
Parents
Loading