feat-agency / vite-plugin-webfont-dl

⚡ Webfont Download Vite Plugin - Make your Vite site load faster
MIT License
302 stars 11 forks source link

webfont-dl not caching fonts #7

Closed psynyde closed 2 years ago

psynyde commented 2 years ago

I'm using vite-plugin-webfont-dl on a vite + vue3 project but it seems that fonts aren't caching when i'm using the plugin here's a deployment without vite-plugin-webfont-dl:

https://vue-blog-ddx2qgapj-simplyvoid.vercel.app/

and here with vite-plugin-webfont-dl:

https://simplyvoid.vercel.app

refresh to see the difference..

0xb4lint commented 2 years ago

Hi @SimplyVoid!

The plugin itself doesn't have any effect on your webserver's cache settings.

You can set your config to cache the generated/versioned assets with the following regex: \.(?:[0-9a-f]{8})\.(?:css|js)