next.js
4b47e00e - Generic typo detection in RSC directives (#68890)

Commit
1 year ago
Generic typo detection in RSC directives (#68890) This PR changes the Server Actions SWC transform, to instead of having a hard coded list of `"use server"` directive typos we use a O(len) algorithm to detect possible mistakes in the directive name. Note that the previous `.iter()` approach is also theoretically slower O(n * len). This was cherry-picked from a larger change which will later make this transform more general and support different directive names (via configurations).
Author
Parents
Loading