Gather Nuxt components metadata on build time and make them available on production.
Gather components metadata on build time and make them available on production. This module is developed to give a visual Markdown Editor with Vue Components in it for Nuxt Studio.
nuxt-component-meta dependency to your project:# Using PNPM
pnpm add nuxt-component-meta
# Using NPM
npm install nuxt-component-meta
nuxt-component-meta to the modules section of your nuxt.config.tsexport default defineNuxtConfig({
modules: ['nuxt-component-meta']
})
<template>
<div>
<h2>`MyComponent` metadata</h2>
<pre>
{{ meta }}
</pre>
</div>
</template>
<script script>
const { data: meta } = await useAsyncData('my-component', () => $fetch('/api/component-meta/my-component'))
</script>
You can install the latest nightly build of the Studio module by running:
npm i nuxt-component-meta@nightly
pnpm installpnpm dev