Fix swc compiling of client components when directive appears later than exports (#54392)
When `"use client"` directive appears after other statements, it should be ignored instead of treat as client components. There's a bug inside swc transform that we should mark the directives detection is "finished" after other non string literals directives AST nodes are detected before the first directive x-ref: https://github.com/vercel/next.js/pull/54358#discussion_r1300740950
Showing
Please
register
or
sign in
to comment