component.css
This works perfectly fine when I am working in my development organization. But the issue is when I create a managed beta package and include the component and static resource. Once I upload the package and install it in a separate test org, the component is no longer able to find the custom font / static resource. I receive the following error in the browser developer console on Google Chrome@font-face {
font-family: 'CustomFont';
src: url('/resource/CustomFont') format('woff');
}
Can I get some guidance on what I am missing here when it comes to using a static resource custom font in an installed managed package? Thank you!GET https://companytestorg.lightning.force.com/resource/CustomFont net::ERR_ABORTED 404 (Not Found)
답변 3개
HI Chris,Based on similar posts from past, it appears to be an issue with the referenced URLRelated: https://salesforce.stackexchange.com/questions/204695/custom-fonts-not-workinghttps://salesforce.stackexchange.com/questions/56897/font-files-in-static-resources-resolve-to-404https://salesforce.stackexchange.com/questions/38940/is-it-possible-to-access-static-resource-of-a-managed-package-in-a-local-vf-page Try using the managed package namespace prefix.Something like
<link href="/resource/namespace__resourceName" rel="stylesheet"/>
<ltng:require script="/resource/namespace__resourceName....."/>
If this information helps, please mark the answer as best. Thank you