I can load images dynamically from a folder in Nuxt (+ webpack) simply with a method like:
getServiceIcon(iconName) {
return require ('../../static/images/svg/services/' + iconName + '.svg');
}
I moved to Vite, and require is not defined here (using rollup). How can I solve this, with nuxt / vite? Any idea?