patternfly / patternfly-elements

PatternFly Elements. A set of community-created web components based on PatternFly design.
https://patternflyelements.org/
MIT License
375 stars 85 forks source link

pf-icon v2 icons not displaying #2792

Closed rlahoda closed 6 days ago

rlahoda commented 6 days ago

Description of the issue

When using pf-icon v2 the icons are not displaying. Checking the console there are these errors for each icon:

[pf-icon] The specifier “@patternfly/icons/fas/cloud.js” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “../” or “/”.

PFE v2.2.2 is imported by Primer so this is impacting any sites currently using pf-icon on the portal.

Impacted component(s)

Steps to reproduce

  1. Go to https://patternflyelements.org/v2/components/icon/
  2. Check console
  3. See error

Expected behavior

The icon component should display icons.

Screenshots

image

Related issues

bennypowers commented 6 days ago

For the portal, you can set an import map, or use PfIcon.getIconUrl to point to a url that's more convenient

Keep in mind that this will change in version 4, see #2766