Closed MagneH closed 4 years ago
Hey, sorry about the delay.
I've done a bit of research and have found that this plugin: @rollup/plugin-image should help you resolve this issue.
This plugin looks like it could do the trick: https://github.com/postcss/postcss-url
In conjunction to the previous issue I mentioned, I also struggled to resolve background images specified in a component scss file.
The path is injected, but the image does not seem to be added to the component bundle. It works in storybook, probably because this is handled by webpack, but when I test my library in a web-app, the images are not included.
One solution could be some sort of loader replacing all image assets referenced in scss files with the hashed version, but I have not come up with a good solution to get this working.