@nuxt/devtools-onboard
v4.0.0-beta.7
Published
The entry point of Nuxt DevTools: loads it when installed, otherwise offers to install it from a floating button.
Readme
@nuxt/devtools-onboard
The entry point of Nuxt DevTools. It is a tiny Nuxt module that Nuxt 5 ships instead of depending on @nuxt/devtools directly:
- when Nuxt DevTools is installed in your project, it loads it:
@nuxt/devtoolsv3 or v4, or a nightly release aliased as@nuxt/devtoolsor installed as@nuxt/devtools-nightly(which wins when both are present); - when it is not,
nuxt devshows a floating button (built on@devframes/hub-ui-onboard) that installs it with your package manager and restarts the dev server, so the real DevTools dock takes its place.
Nothing is injected outside nuxt dev.
The dev server can be reachable from other devices, so each install from the button waits for you in the terminal that runs nuxt dev. In nuxi's interactive view, press y; in plain mode, type yes and press Enter. Anything else refuses, and so does no answer within 5 minutes. When the terminal cannot answer, for example after the dev server restarted under the interactive view, the install is refused and the panel shows the command to run yourself.
Turning it off
devtools: false(ordevtools: { enabled: false }) innuxt.configdisables both the button and DevTools.- Disable entirely in the button's panel writes
node_modules/.devframe/hub-ui-onboard.json; the button stays hidden on later starts until you delete that file or set thedevtoolsoption explicitly. - Hide for now hides the button for the current tab only.
Nuxt 4
Nuxt 4 depends on @nuxt/devtools itself, so this package is not needed there. Adding it to modules still works: it loads the installed DevTools and never shows the button.
export default defineNuxtConfig({
modules: ['@nuxt/devtools-onboard'],
})