-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[code-infra] Add "use client" directive to files with React APIs #45036
Conversation
Netlify deploy previewhttps://deploy-preview-45036--material-ui.netlify.app/ Bundle size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,3 +1,4 @@ | |||
'use client'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we exclude test files?
I didn't know if you were referring to that or the eslint plugin. The reason is to avoid |
🙂 It's already covered with the Lines 254 to 258 in 820a76c
|
This otherwise breaks react server components in Next.js when moving to full ESM.
copilot wrote me a eslint plugin that detects those and autofixes. we can't add them to index files
For reference: vercel/next.js#75128