0

I have a repository A where I have images in public folder. I am publishing this package using yalc and using it in another repository B which is a chrome extension and build on react code.

I have a component in repository A, say COMPONENT-A, where I am rendering images from public folder using img src.

When I launch chrome extension. COMPONENT-A is not loading with images. I am not sure how to point to images.

const imageUrl = `${process.env.PUBLIC_URL}/img-${i}.png

 <img src={imageUrl} alt={`img-${i}`}/>

I used below for image src. `But, this is pointing to public folder of repository B.

0 Answers0