diff --git a/packages/nuxt/src/index.ts b/packages/nuxt/src/index.ts index 7a8ff80e79..ca6971f24b 100644 --- a/packages/nuxt/src/index.ts +++ b/packages/nuxt/src/index.ts @@ -78,6 +78,21 @@ export default defineNuxtModule({ config.plugins.unshift(...VitePlugin({}, unoConfig)) }) + if (nuxt.options.dev) { + // @ts-expect-error missing type + nuxt.hook('devtools:customTabs', (tabs) => { + tabs.push({ + title: 'UnoCSS', + name: 'unocss', + icon: 'logos-unocss', + view: { + type: 'iframe', + src: '/__unocss/', + }, + }) + }) + } + // Nuxt 2 if (isNuxt2()) { nuxt.hook('app:resolve', (config) => {