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
We're have a library, and want to turn off the first-child, etc. warnings, since SSR is not a concern for us. I'm aware of adding /* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */ as a comment, but because we also use babel-plugin-emotion, the comment is simply stripped away during minification.
Loosen the requirements to use the magic comment such that a @ can be added, to prevent babel-plugin-emotion from stripping it away during minification.
Alternative solutions
Only emit the warning if actually used in an SSR context.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
This indeed sounds useful, I think we should squeeze this into upcoming v11. Would you maybe be willing to work on this? I believe we should just make this comment kept for non-production code as-is, no @ required.
The problem
We're have a library, and want to turn off the
first-child
, etc. warnings, since SSR is not a concern for us. I'm aware of adding/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */
as a comment, but because we also use babel-plugin-emotion, the comment is simply stripped away during minification.babel-plugin-emotion skips removal of comments that have
@
embedded within them, and it would be nice to be able to add that to the magic comment that, at this time, must be character-for-character identical to what I pasted above.Proposed solution
Loosen the requirements to use the magic comment such that a
@
can be added, to prevent babel-plugin-emotion from stripping it away during minification.Alternative solutions
Only emit the warning if actually used in an SSR context.
Additional context
N/A
The text was updated successfully, but these errors were encountered: