Image (and font) paths are not found in <usa-banner> component
#134
Unanswered
thescientist13
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Acknowledging this is all in alpha still, I was just curious if I was missing something as I was playing around with these components and not being able to load some of the linked images within the components, like the expand images in the
<usa-banner>component.For example, loading the component and its inlined styles work fine, but not the expand images

Looking at the bundled output, there are relative references to these image assets (as well as fonts)
https://app.unpkg.com/@uswds/web-components@0.0.1-alpha/files/dist/components/usa-banner.js#L303
However, based on the source code, these look to be coming from the @uswds/uswds package?
https://app.unpkg.com/@uswds/web-components@0.0.1-alpha/files/src/components/usa-banner/usa-banner.scss.js#L6
I guess the bundling process is inlining those references as paths instead of leaving them as bare specifiers? Bare specifiers should work since @uswds/uswds defines an
exportsmap for all these, at least as far as I can tellhttps://app.unpkg.com/@uswds/uswds@3.13.0/files/package.json#L35
Beta Was this translation helpful? Give feedback.
All reactions