mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### What?
Implements a transform that adds readable names to anonymous function
expressions in react component functions.
Adding `{ debugFunctionName: true }` to swcOptions will do the trick.
### Why?
x-ref: https://vercel.slack.com/archives/C04TR3U872A/p1721702161121619
### How?
5 lines
97 B
JavaScript
5 lines
97 B
JavaScript
function C() {
|
|
function handleClick() {}
|
|
const onClick = useCallback(handleClick, []);
|
|
}
|