We are using Ant Design Icons in various WordPress plugins. For this, we need to use IconProvider with a custom prefixCls. Unfortunately, the styles for the second instance of enqueued icons does not get inserted into the DOM as antd-design-icons is already available in the DOM:
Hey!
We are using Ant Design Icons in various WordPress plugins. For this, we need to use
IconProvider
with a customprefixCls
. Unfortunately, the styles for the second instance of enqueued icons does not get inserted into the DOM asantd-design-icons
is already available in the DOM:https://github.com/ant-design/ant-design-icons/blob/11966e46ed5f74e09f179c9cfb1ef80a598ef924/packages/icons-react/src/utils.ts#L169
To fix this, we apply currently a custom patch through
patch-package
:Is there any reason why
prefixCls
is not used for the unique ID of the stylesheet? 😊