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
PfIcon imports it's icons from ./icons/${set}/${name}.js, relative to the module in which PfIcon is located via import.meta.url.
When bundling PfIcon into pfe.min.js, we should either append setup code that redirects to ./pf-icon/icons/${set}/${name}.js, or we should employ a bundler plugin to rewrite the import URL relative to the new location of import.meta.url. this plugin merely copies the referenced files, but perhaps we could take inspiration. this esbuild issue contains a variety of directions would could go in to solve this on the esbuild config side
Impacted component(s)
pf-icon
Steps to reproduce
<scripttype="module">// import from minified bundleimport{PfIcon}from'https://jspm.dev/@patternfly/elements';</script><pf-iconset="patternfly" icon="bell"></pf-icon>
Expected behavior
Icon loads without error
Workaround
It remains possible to work around this with a one-liner:
Description of the issue
PfIcon
imports it's icons from./icons/${set}/${name}.js
, relative to the module in whichPfIcon
is located viaimport.meta.url
.When bundling PfIcon into pfe.min.js, we should either append setup code that redirects to
./pf-icon/icons/${set}/${name}.js
, or we should employ a bundler plugin to rewrite the import URL relative to the new location ofimport.meta.url
. this plugin merely copies the referenced files, but perhaps we could take inspiration. this esbuild issue contains a variety of directions would could go in to solve this on the esbuild config sideImpacted component(s)
Steps to reproduce
Expected behavior
Icon loads without error
Workaround
It remains possible to work around this with a one-liner:
Related issues
anujsingla/website-webcomponent#1
The text was updated successfully, but these errors were encountered: