Open renegadevi opened 1 year ago
Do you want to disable it in development only @renegadevi ?
Because it production this can lead to serious performance drawbacks.
Do you want to disable it in development only @renegadevi ?
Yes this is mainly during development or testing.
Have you try adding a plugin to do it @renegadevi
// plugins/iconify.ts
import { disableCache } from 'iconify-icon';
export default defineNuxtPlugin(() => {
if (process.dev) {
disableCache('all')
}
})
Sadly not. I tried it with the nuxt-icons and just standalone iconify-icons, both still cached.
Iconify by default has cache enabled, this is good for performance but because it uses localStorage, it's something that may not always be initially wanted. As for Iconify, it creates more entries the more icons you use.
Iconify has a built-in function to disable this, but I cannot find any way to disable it with this module, such as in module options in the nuxtIcon-config which would had been very useful. https://iconify.design/docs/iconify-icon/disable-cache.html