Best way to export my library images

246 views Asked by At

I've developed a library which has some images.

I'm using file-loader in order to export them in my production into a res folder. So my distribution folder look as follow

./dist
--- my.core.js
--- my.core.css
--+ res
     --- img1.png
     --- img2.png

The problem is when a client uses my library he has to put this res folder in his main url.

My question is how do I make webpack/file-loader search the res folder in relative to the my.core.js. so my clients will simply put my library dist folder where ever they want in their server. without moving the res folder somewhere else.

url-loader is solving my problem, but i do not want to embed my images in my js files

0

There are 0 answers