next.js
d9874838 - Fix `export const foo = function bar(){}` in server reference transform (#100830)

Commit
3 days ago
Fix `export const foo = function bar(){}` in server reference transform (#100830) It was doing something like this: ```js "use server"; export const foo = async function bar() { return 'exported named function expression'; }; ensureServerEntryExports([ bar, // should be foo! ]); registerServerReference(bar, "003c8ed39a99caf636869d076cc7cae786a4053164", null); // shoudl be foo! ``` leading to ``` тип ReferenceError: quux is not defined at module evaluation (test/development/app-dir/source-mapping/app/actions1.ts:15:35) at module evaluation (test/development/app-dir/source-mapping/app/page.tsx:2:1) 13 | } 14 | > 15 | export const qux = async function quux() { | ^ 16 | return 'exported named function expression' 17 | } 18 | { page: '/' } ```
Author
Parents
Loading