The "i-prefer-import-meta-url-over-using-esm-import-to-get-a-relative-file-url" plugin ;-)
In my components library, I have SVG images.
I used them with <img>
tags in my components and to get the proper relative URL, I use new URL('../assets/image.svg', import.meta.url').href
.
To make this work in a rollup build, you need to: