nuxt-svg-loader icon indicating copy to clipboard operation
nuxt-svg-loader copied to clipboard

Bug? vuetify is broken when tree-shaking is enabled

Open larzon83 opened this issue 6 years ago • 4 comments

Hey,

I currently use Vuetify (1.5.16) in my nuxt-app. I also use vuetify-loader to only include the used components. However, after installing this module my whole app looks like crap. The console is full of these messages: [Vue warn]: Unknown custom element: did you register the component correctly? It seems like the vuetify-loader rules getting overwritten or something like that.

Vuetify is implemented as a plugin, as this was the standard way before the nuxt/vuetify module. I therefore quickly created a fresh/new nuxt-app with the nuxt-vuetify-module. After enabling tree-shaking (a must, to use vuetify-loader under the hood), the app breaks as well. See attached screenshot. Without tree-shaking, everything is fine. BTW: the beautiful red icon is a svg with css styling -> your module works :)

I don't know, if this should be fixed on your side or vuetify-loader? Any ideas?

Bildschirmfoto 2019-08-07 um 23 36 15

larzon83 avatar Aug 07 '19 21:08 larzon83

Someone can help?

larzon83 avatar Aug 29 '19 21:08 larzon83

Had the exact same issue. I moved over to https://www.npmjs.com/package/nuxt-svg which has since been deprecated in favour of https://www.npmjs.com/package/@nuxtjs/svg

It works super nice

morganphilo avatar Aug 29 '19 21:08 morganphilo

thx, I'll check it out.

larzon83 avatar Aug 30 '19 13:08 larzon83

Yep, just lost me 3 hours x)

lvaroqui avatar Jan 19 '20 17:01 lvaroqui