nuxt-community / module-template-rollup

Starter template for Nuxt.js Modules with rollup
MIT License
11 stars 3 forks source link

How can I export a component? #2

Open wstam88 opened 6 years ago

wstam88 commented 6 years ago

How can I export a component with this module-template? I have a store which works fine, but components wont work for some reason.

Thanks in advance

pi0 commented 6 years ago

Hi. I suggest using simpler module-template. For exporting components, we can simply register a plugin which registers any component we want.

wstam88 commented 6 years ago

Do you know about any documentation about registering components from within a plugin (in a module)? I couldn't find any at https://nuxtjs.org/guide/modules.

wstam88 commented 6 years ago

It doesnt matter much what I try, keep gettting: This relative module was not found: ./SurveyForm.vue in ./.nuxt/plugin.js.

Using your module-template, where would I put my components so that they can actually be found?