Guides
Nuxt
Nuxt renders its own HTML, so the runtime arrives through a virtual module.
Nuxt builds on Vite, so the plugin still serves the runtime, the picks endpoint and the agent file.
What it cannot do is inject the script tag: transformIndexHtml is a Vite SPA hook, and Nuxt
renders the document itself.
The plugin therefore exposes a virtual module you import from a client-only file. One line, with the plugin's options already baked in.
Install
Terminal
pnpm add -D vite-plugin-quello
Configure
nuxt.config.ts
import quello from 'vite-plugin-quello'
export default defineNuxtConfig({
vite: {
plugins: [quello()],
},
})
plugins/quello.client.ts
export default defineNuxtPlugin(() => {
if (import.meta.dev) import('virtual:quello')
})
The .client suffix keeps it out of the server bundle, and import.meta.dev keeps it out of
production — where the virtual module resolves to nothing anyway.
What a pick will know
Component name and source file, read from Nuxt's Vue internals:
{
"framework": {
"framework": "vue",
"component": "index",
"file": "/abs/path/pages/index.vue"
}
}
Running
vite-plugin-vue-devtools? It annotates
elements with the file, line and column. quello does not read that yet — it is
on the roadmap.