Closed Kapcash closed 3 years ago
This option is not supportet...
You can add a Nuxt-Plugins that registers these components manualy:
Vue.component('VCol', VCol)
and so on (Make shure to import the right stuff)
This is what I did as a workaround for the moment, yes :)
But what do you mean it is not supported? It's literally described on the documentation (#treeshake).
Also, as mentioned, even without updating the module's treeshake
option, just importing the components causes the issue. And I'm not seeing why a simple import could break the vuetify compilation...
Do you have any idea for this?
OK. Did not know about this feature... But you have to use strings and not import the components so:
treeShake: {
components: ['VRow', 'VCol'],
}
It worked, thank you! :)
I got confused because from vuetify documentation, you have to import the component.
Module version v.1.11.3
Describe the bug When importing a component manually from the
nuxt.config.js
file, it causes a compilation error.Then, running
yarn dev
, we get the error:The goal is to register these components globally, but I found out not updating the
treeShake
option don't have any relation with the bug.To Reproduce
Codesandbox link
Steps to reproduce the behavior:
nuxt.config.js
file.yarn dev
on the codesandbox console.If you remove the import line, the app starts without errors.
Expected behavior Importing the components should not cause any issue.
Additional context I reproduced using nuxt v.2.14.12 or under. Upgrading to v.2.15.3 fixes the problem. Nonetheless, I expected it to work with this version of Nuxt.