Tirius
Nuxt Kit - addComponentsDir how exacly does import work ?
Docs say
Register a directory to be scanned for components and imported only when used.
Hello. I have a custom module that ship multiple custom components.
Lets say I have a static generated Nuxt app that use that module, app have multiple pages, each page use one of the component.
Does it mean that module components only be loaded by browser when I navigate to that page ?
Or does it mean that only components that I have used in that app will be included in some Nuxt bundle? Thanks.4 replies
It is possible to modify components with Nuxt hooks ?
I need to modify component inside custom module.
I was able to modify "templates" files using
app:templates
hook inside defineNuxtModule
setup method, but how to modify components that was add using addComponentsDir
?
1 replies
Testing custom Module.
Hello. I'm developing a Nuxt module, this module have component that is using composable that import/export data from
"#build"
. Component is working in real app environment. But how can I test this type of component?
My test throw this error.
Error: Failed to resolve import "#imports" from "node_modules/@nuxt/test-utils/dist/runtime-utils/index.mjs". Does the file exist?3 replies