I'm trying to migrate some of my atmosphere packages to npm packages and ran into some issues with images not loading in the npm package uploadcare-widget. The package references images in the folder node_modules/uploadcare-widget/images
. The images are displayed on the page via css, for example:
.uploadcare-dialog-file-sources:before {
background-image: url("node_modules/uploadcare-widget/images/arrow.png");
}
I can see my app attempts to load the images from the network inspector, but the image doesn't load from the displayed path. I can confirm that image files are in the specified file directory. Is there something special I need to do to be able to load images from an npm package?
I tried import 'node_modules/uploadcare-widget/images';
and other variations inside the public folder. I'll probably end up going back to using an atmosphere package :\