Skip to content

Commit 1f6a712

Browse files
antfuclaude
andauthored
docs: add package resolution instructions for v4.0 opt-in (#956)
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 2b157fb commit 1f6a712

2 files changed

Lines changed: 146 additions & 10 deletions

File tree

README.md

Lines changed: 84 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,100 @@ export default defineNuxtConfig({
4444
})
4545
```
4646

47+
### Opting in to v4.0
48+
49+
Nuxt DevTools v4.0 is currently in alpha. Since Nuxt ships with a built-in version of DevTools, you can opt-in to v4.0 by using package manager resolutions to override the bundled version:
50+
51+
<details>
52+
<summary>npm</summary>
53+
54+
```json
55+
{
56+
"overrides": {
57+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
58+
}
59+
}
60+
```
61+
62+
</details>
63+
64+
<details>
65+
<summary>yarn</summary>
66+
67+
```json
68+
{
69+
"resolutions": {
70+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
71+
}
72+
}
73+
```
74+
75+
</details>
76+
77+
<details>
78+
<summary>pnpm</summary>
79+
80+
```json
81+
{
82+
"pnpm": {
83+
"overrides": {
84+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
85+
}
86+
}
87+
}
88+
```
89+
90+
</details>
91+
92+
Remove lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and reinstall dependencies.
93+
4794
### Nightly Release Channel
4895

4996
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.
5097

51-
You can opt-in to the nightly release channel by running:
98+
You can opt-in to the nightly release channel by using package manager resolutions:
99+
100+
<details>
101+
<summary>npm</summary>
102+
103+
```json
104+
{
105+
"overrides": {
106+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
107+
}
108+
}
109+
```
110+
111+
</details>
112+
113+
<details>
114+
<summary>yarn</summary>
115+
116+
```json
117+
{
118+
"resolutions": {
119+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
120+
}
121+
}
122+
```
123+
124+
</details>
52125

53-
```diff
126+
<details>
127+
<summary>pnpm</summary>
128+
129+
```json
54130
{
55-
"devDependencies": {
56-
-- "@nuxt/devtools": "^0.1.0"
57-
++ "@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
131+
"pnpm": {
132+
"overrides": {
133+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
134+
}
58135
}
59136
}
60137
```
61138

139+
</details>
140+
62141
Remove lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and reinstall dependencies.
63142

64143
### Module Options

docs/content/1.guide/0.getting-started.md

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,78 @@ export default defineNuxtConfig({
1717

1818
Restart your Nuxt server and open your app in browser. Click the Nuxt icon on the bottom (or press :kbd{value="Shift"} + :kbd{value="Alt"} / :kbd{value="⇧ Shift"} + :kbd{value="⌥ Option"} + :kbd{value="D"}) to toggle the DevTools.
1919

20+
### Opting in to v4.0
21+
22+
Nuxt DevTools v4.0 is currently in alpha. Since Nuxt ships with a built-in version of DevTools, you can opt-in to v4.0 by using package manager resolutions to override the bundled version:
23+
24+
::code-group
25+
26+
```json [npm]
27+
{
28+
"overrides": {
29+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
30+
}
31+
}
32+
```
33+
34+
```json [yarn]
35+
{
36+
"resolutions": {
37+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
38+
}
39+
}
40+
```
41+
42+
```json [pnpm]
43+
{
44+
"pnpm": {
45+
"overrides": {
46+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
47+
}
48+
}
49+
}
50+
```
51+
52+
::
53+
54+
Remove lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and reinstall dependencies.
55+
2056
### Nightly Release Channel
2157

2258
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.
2359

24-
You can opt-in to the nightly release channel by running:
60+
You can opt-in to the nightly release channel by using package manager resolutions:
61+
62+
::code-group
63+
64+
```json [npm]
65+
{
66+
"overrides": {
67+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
68+
}
69+
}
70+
```
71+
72+
```json [yarn]
73+
{
74+
"resolutions": {
75+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
76+
}
77+
}
78+
```
2579

26-
```diff
80+
```json [pnpm]
2781
{
28-
"devDependencies": {
29-
-- "@nuxt/devtools": "^0.1.0"
30-
++ "@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
82+
"pnpm": {
83+
"overrides": {
84+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
85+
}
3186
}
3287
}
3388
```
3489

90+
::
91+
3592
Remove lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and reinstall dependencies.
3693

3794
### Module Options

0 commit comments

Comments
 (0)