Heroicon warns via a console message, if an icon does not exist. This is too subtle for me. I want it to scream into my face while I am in development, test and maybe also in the staging environment.
I solved this with a monkey patch. However, I would prefer to be able to configure this.
# Monkey patch to raise an error if the icon does not exist
class Heroicon::Icon
def warning
return unless Rails.env.development? || Rails.env.test?
raise ArgumentError, "The icon '#{name}' does not exist."
end
end
Heroicon warns via a console message, if an icon does not exist. This is too subtle for me. I want it to scream into my face while I am in development, test and maybe also in the staging environment.
I solved this with a monkey patch. However, I would prefer to be able to configure this.