Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 2 additions & 44 deletions docs/content/1.guide/0.getting-started.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,22 @@
---
title: Getting Started
description: Using Nuxt DevTools in your Nuxt project is only a command away.
description: Nuxt DevTools is shipped with Nuxt. Enable it in your config to get started.
---

## Installation

::callout
Nuxt DevTools v2 requires **Nuxt v3.15.0 or higher**.
::

### Auto Install

You just need to go to your `nuxt.config` file and set `devtools` to `true`:
Nuxt DevTools is shipped with Nuxt. To enable it, set `devtools` to `true` in your `nuxt.config`:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
devtools: { enabled: true },
})
```

Nuxt will automatically install the DevTools module for you.

### Install using Nuxi

You can opt-in Nuxt DevTools per-project by going to the project root and run:

```bash
npx nuxi@latest devtools enable
```

### Open the DevTools Panel

Restart your Nuxt server and open your app in browser. Click the Nuxt icon on the bottom (or press <kbd>Shift</kbd> + <kbd>Alt</kbd> / <kbd>⇧ Shift</kbd> + <kbd>⌥ Option</kbd> + <kbd>D</kbd>) to toggle the DevTools.

::callout
If you using `nvm` or other Node version managers, we suggest to run the enable command again after switching Node version.
::

Similarly, you can disable it per-project by running:

```bash
npx nuxi@latest devtools disable
```

### Install Manually

Nuxt DevTools is currently provided as a module (might be changed in the future). If you prefer, you can also install it locally, which will be activated for all your team members.

```bash
npm i -D @nuxt/devtools
```

```ts [nuxt.config.ts]
export default defineNuxtConfig({
modules: [
'@nuxt/devtools',
],
})
```

### Nightly Release Channel

Similar to [Nuxt's Nightly Channel](https://nuxt.com/docs/guide/going-further/nightly-release-channel), DevTools also offers a nightly release channel, that automatically releases for every commit to `main` branch.
Expand Down
29 changes: 29 additions & 0 deletions docs/content/2.module/3.migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,32 @@ const subprocess = startSubprocess(/* ... */)
+ const result = subprocess.getResult()
+ result.process?.stdout?.on('data', handler)
```

## Global Install Support Removed

Nuxt DevTools no longer supports being installed globally.

- The `devtoolsGlobal` Nuxt config option (with `projects` whitelist) is no longer supported
- The `-g` flag is no longer used when installing/uninstalling `@nuxt/devtools` via the DevTools UI
- The `isGlobalInstall` property has been removed from `NuxtDevtoolsInfo`

## `@nuxt/devtools-wizard` Package and `nuxi devtools` Removed

The `@nuxt/devtools-wizard` package, its CLI, and the `nuxi devtools enable/disable` subcommand have been removed. DevTools is shipped with Nuxt — to enable or disable it, update your `nuxt.config.ts` directly:

```ts
export default defineNuxtConfig({
devtools: { enabled: true }, // or false
})
```

## `runWizard` RPC Removed

The `runWizard` server RPC function has been removed from `ServerFunctions`. The `enablePages` action is now available as a direct RPC function:

```diff
- await rpc.runWizard(token, 'enablePages')
+ await rpc.enablePages(token)
```

The `WizardFunctions`, `WizardActions`, and `GetWizardArgs` types have been removed from `@nuxt/devtools-kit`.
1 change: 0 additions & 1 deletion packages/devtools-kit/src/_types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ export * from './rpc'
export * from './server-ctx'
export * from './terminals'
export * from './timeline-metrics'
export * from './wizard'
1 change: 0 additions & 1 deletion packages/devtools-kit/src/_types/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export type NpmCommandType = 'install' | 'uninstall' | 'update'

export interface NpmCommandOptions {
dev?: boolean
global?: boolean
}

export interface AutoImportsWithMetadata {
Expand Down
7 changes: 0 additions & 7 deletions packages/devtools-kit/src/_types/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,6 @@ export interface ModuleOptions {
telemetry?: boolean
}

export interface ModuleGlobalOptions {
/**
* List of projects to enable devtools for. Only works when devtools is installed globally.
*/
projects?: string[]
}

export interface VSCodeIntegrationOptions {
/**
* Enable VS Code Server integration
Expand Down
3 changes: 1 addition & 2 deletions packages/devtools-kit/src/_types/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import type { AssetEntry, AssetInfo, AutoImportsWithMetadata, ComponentRelations
import type { ModuleOptions, NuxtDevToolsOptions } from './options'
import type { InstallModuleReturn, ServerDebugContext } from './server-ctx'
import type { TerminalAction, TerminalInfo } from './terminals'
import type { GetWizardArgs, WizardActions } from './wizard'

export interface ServerFunctions {
// Static RPCs (can be provide on production build in the future)
Expand Down Expand Up @@ -67,7 +66,7 @@ export interface ServerFunctions {
// Actions
telemetryEvent: (payload: object, immediate?: boolean) => void
customTabAction: (name: string, action: number) => Promise<boolean>
runWizard: <T extends WizardActions>(token: string, name: T, ...args: GetWizardArgs<T>) => Promise<void>
enablePages: (token: string) => Promise<void>
openInEditor: (filepath: string) => Promise<boolean>
restartNuxt: (token: string, hard?: boolean) => Promise<void>
installNuxtModule: (token: string, name: string, dry?: boolean) => Promise<InstallModuleReturn>
Expand Down
1 change: 0 additions & 1 deletion packages/devtools-kit/src/_types/server-ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export interface NuxtDevtoolsServerContext {
export interface NuxtDevtoolsInfo {
version: string
packagePath: string
isGlobalInstall: boolean
}

export interface InstallModuleReturn {
Expand Down
7 changes: 0 additions & 7 deletions packages/devtools-kit/src/_types/wizard.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/devtools-wizard/build.config.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/devtools-wizard/cli.mjs

This file was deleted.

41 changes: 0 additions & 41 deletions packages/devtools-wizard/package.json

This file was deleted.

116 changes: 0 additions & 116 deletions packages/devtools-wizard/src/builtin.ts

This file was deleted.

61 changes: 0 additions & 61 deletions packages/devtools-wizard/src/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/devtools/cli.mjs

This file was deleted.

Loading
Loading