nilssso
Nuxt Content ContentSlot and "property was accessed but is not defined"
For Nuxt Content I wrote a simple card component that wraps Nuxt UI's "UCard" so that in markdown I can write this
The component is defined as this:
But when loading the page I get swamped with a few "property was accessed but is not defined" Vue warn warnings
Is there anything special I need to write in the component that I missing?
These warnings do not occur for
<slot />
, only for <content-slot>
.
And it doesn't look related to UCard, since if I replace u-card
with just div
(and remove #header
/#footer
from the template tags) I get the same warnings.1 replies
Writing a module, how to import template into composable?
I'm trying my hand at writing a module and so far so good.
1. It fetches an OpenAPI schema
2. Builds it using
openapi-typescript
3. Writes it to the project build directory via @nuxt/kit
addTemplate
4. And adds a composable via @nuxt/kit
addImports
The setup
function is this
My question now is, how can I import the written template api.d.ts
into my added composable? I assume this should be possible since this is all done a build time?1 replies