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
{{ message }}
Repository navigation
Two plugins with the same name produce the same class names, so one subtree gets the other's CSS #5828
Class names fold in the plugin configuration so that a component under different plugins gets different classes. Each plugin contributes only its name to that hash, so two different plugins that share a name hash identically. Whichever subtree renders first decides the CSS for both. This happens on the client, in classic server rendering, and in server components.
On 6.x the same happens with stylisPlugins and two middleware functions that share a name.
Expected: each subtree's Box gets its own class with its own plugin's output (color:RED and color:red).
Actual: both get the same class and a single rule, color:RED.
Related on 6.x: a plugin with no name is supposed to throw error 15, but the error is created and never thrown, so anonymous plugins are accepted silently. Two inline arrow-function plugins then share a class with each other and with the same component rendered without plugins. On main the error throws as intended.
A fix would derive the plugin part of the hash from something unique per plugin rather than its name, or warn in development when two different plugins in use share a name.
Activity
pullfrog commentedon Oct 10, 2026
fix: throw the unnamed stylis plugin error instead of discarding it (#…
fix: warn in development when two plugins share a name (#5844)