oliverfindl / vue-svg-inline-plugin

Vue plugin for inline replacement of SVG images with actual content of SVG files.
MIT License
33 stars 3 forks source link

Image cached? #17

Closed tomastan closed 1 year ago

tomastan commented 1 year ago

It looks that the plugin caches the SVG file before importing. So if the file is changed, I still see old file inline. As a workaround I had to add "?.." in the URL.

So does the cache really exist? And how to flush it on source image change?

tomastan commented 1 year ago

Unfortunately the workaround is not good. We have different git branches with different SVG images and the same Vue source code. So switching to between branches keeps the image from the initial branch instead of the correct one from the branch checked out.

oliverfindl commented 1 year ago

Hello,

please do as follows:

I was gonna disable this feature in February, because of legislation changes in my country (cannot access user storage without user consent), but I totally forgot about it.

I will update this package in few days.

Thanks.

tomastan commented 1 year ago

Hi @oliverfindl,

Good sarcasm ;). It was not clear what localCache has in common with the build process, so I skipped that first. It helped after all. Hence the cache looks to be still not flushed, as if I restore cache.persistent setting back, I get old cached file. But if you going to remove this setting anyway, this issue may be irrelevant.

Thanks for the support