You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On format, the «prettier-plugin-sort-imports», will move the "use client"; directive below the imports, prettier will then wrap it in parenthesis since it's not at the top of file. This breaks client components in Next 13. The same happens when using the use strict; directive.
Adding «// prettier-ignore» above the "use client"; directive does nothing. This part is probably related to #112.
To Reproduce
Use the code snippet above and run prettier --write .
Expected behavior
The "use client"; directive should be left at the top of the file.
The text was updated successfully, but these errors were encountered:
Your Environment
Describe the bug
Consider the following code:
On format, the «prettier-plugin-sort-imports», will move the
"use client";
directive below the imports, prettier will then wrap it in parenthesis since it's not at the top of file. This breaks client components in Next 13. The same happens when using theuse strict;
directive.Adding «// prettier-ignore» above the
"use client";
directive does nothing. This part is probably related to #112.To Reproduce
Use the code snippet above and run
prettier --write .
Expected behavior
The
"use client";
directive should be left at the top of the file.The text was updated successfully, but these errors were encountered: