[Vuejs]-Vue-Leaflet (Nuxt) produce error Unexpected character '�' when using PNG tiles

0👍

This discussion pointed me in the right direction :
https://github.com/nuxt/nuxt/issues/14071

That looks like you probably need to add leaflet to your
build.transpile array (as it’s trying to import a .png file, which
won’t work without being transpiled).

Had to add this to nuxt.config.js :

transpile: ['leaflet', "@vue-leaflet/vue-leaflet"],

Leave a comment