@nuxt/docs-nightly 4.3.0-29473037.29a5a434 → 4.3.0-29473862.8e12791b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/1.getting-started/06.styling.md +4 -0
- package/1.getting-started/15.prerendering.md +4 -0
- package/1.getting-started/17.testing.md +3 -0
- package/1.getting-started/18.upgrade.md +13 -0
- package/2.directory-structure/1.app/1.plugins.md +3 -0
- package/2.directory-structure/1.server.md +1 -2
- package/3.guide/1.concepts/8.typescript.md +4 -0
- package/3.guide/5.recipes/2.vite-plugin.md +4 -0
- package/5.community/4.contribution.md +1 -1
- package/6.bridge/1.overview.md +8 -0
- package/6.bridge/8.nitro.md +4 -0
- package/package.json +1 -1
|
@@ -768,6 +768,9 @@ pnpm add -D @playwright/test @nuxt/test-utils
|
|
|
768
768
|
```bash [bun]
|
|
769
769
|
bun add --dev @playwright/test @nuxt/test-utils
|
|
770
770
|
```
|
|
771
|
+
```bash [deno]
|
|
772
|
+
deno add --dev npm:@playwright/test npm:@nuxt/test-utils
|
|
773
|
+
```
|
|
771
774
|
::
|
|
772
775
|
|
|
773
776
|
You can provide global Nuxt configuration, with the same configuration details as the `setup()` function mentioned earlier in this section.
|
|
@@ -28,6 +28,10 @@ pnpm nuxt upgrade
|
|
|
28
28
|
bun x nuxt upgrade
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
```bash [deno]
|
|
32
|
+
deno x nuxt upgrade
|
|
33
|
+
```
|
|
34
|
+
|
|
31
35
|
::
|
|
32
36
|
|
|
33
37
|
### Nightly Release Channel
|
|
@@ -198,6 +202,10 @@ pnpm add nuxt@^4.0.0
|
|
|
198
202
|
bun add nuxt@^4.0.0
|
|
199
203
|
```
|
|
200
204
|
|
|
205
|
+
```bash [deno]
|
|
206
|
+
deno add npm:nuxt@^4.0.0
|
|
207
|
+
```
|
|
208
|
+
|
|
201
209
|
::
|
|
202
210
|
|
|
203
211
|
After upgrading, most Nuxt 4 behaviors are now the default. However, some features can still be configured if you need to maintain backward compatibility during your migration.
|
|
@@ -240,6 +248,11 @@ pnpm dlx codemod@0.18.7 nuxt/4/migration-recipe
|
|
|
240
248
|
bun x codemod@0.18.7 nuxt/4/migration-recipe
|
|
241
249
|
```
|
|
242
250
|
|
|
251
|
+
```bash [deno]
|
|
252
|
+
# Using pinned version due to https://github.com/codemod/codemod/issues/1710
|
|
253
|
+
deno x codemod@0.18.7 nuxt/4/migration-recipe
|
|
254
|
+
```
|
|
255
|
+
|
|
243
256
|
::
|
|
244
257
|
|
|
245
258
|
This command will execute all codemods in sequence, with the option to deselect any that you do not wish to run. Each codemod is also listed below alongside its respective change and can be executed independently.
|
|
@@ -112,8 +112,6 @@ For example, you can define a custom handler utility that wraps the original han
|
|
|
112
112
|
**Example:**
|
|
113
113
|
|
|
114
114
|
```ts [server/utils/handler.ts]
|
|
115
|
-
import type { EventHandler, EventHandlerRequest } from 'h3'
|
|
116
|
-
|
|
117
115
|
export const defineWrappedResponseHandler = <T extends EventHandlerRequest, D> (
|
|
118
116
|
handler: EventHandler<T, D>,
|
|
119
117
|
): EventHandler<T, D> =>
|
|
@@ -129,6 +127,7 @@ export const defineWrappedResponseHandler = <T extends EventHandlerRequest, D> (
|
|
|
129
127
|
}
|
|
130
128
|
})
|
|
131
129
|
```
|
|
130
|
+
|
|
132
131
|
```ts [server/api/hello.get.ts]
|
|
133
132
|
export default defineWrappedResponseHandler(event => 'hello world')
|
|
134
133
|
```
|
|
@@ -27,6 +27,10 @@ To enable type-checking at build or development time, install `vue-tsc` and `typ
|
|
|
27
27
|
bun add -D vue-tsc typescript
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
```bash [deno]
|
|
31
|
+
deno add -D npm:vue-tsc npm:typescript
|
|
32
|
+
```
|
|
33
|
+
|
|
30
34
|
::
|
|
31
35
|
|
|
32
36
|
Then, run [`nuxt typecheck`](/docs/4.x/api/commands/typecheck) command to check your types:
|
|
@@ -26,6 +26,10 @@ First, we need to install the Vite plugin, for our example, we'll use `@rollup/p
|
|
|
26
26
|
bun add @rollup/plugin-yaml
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
```bash [deno]
|
|
30
|
+
deno add npm:@rollup/plugin-yaml
|
|
31
|
+
```
|
|
32
|
+
|
|
29
33
|
::
|
|
30
34
|
|
|
31
35
|
Next, we need to import and add it to our [`nuxt.config.ts`](/docs/4.x/directory-structure/nuxt-config) file:
|
|
@@ -172,7 +172,7 @@ We recommend using [VS Code](https://code.visualstudio.com) along with the [ESLi
|
|
|
172
172
|
|
|
173
173
|
#### No Prettier
|
|
174
174
|
|
|
175
|
-
Since ESLint is already configured to format the code, there is no need to duplicate the functionality with Prettier. To format the code, you can run `yarn lint --fix`, `pnpm lint --fix`, or `
|
|
175
|
+
Since ESLint is already configured to format the code, there is no need to duplicate the functionality with Prettier. To format the code, you can run `yarn lint --fix`, `pnpm lint --fix`, `bun run lint --fix`, or `deno run lint --fix` or referring the [ESLint section](/docs/4.x/community/contribution#use-eslint) for IDE Setup.
|
|
176
176
|
|
|
177
177
|
If you have Prettier installed in your editor, we recommend you disable it when working on the project to avoid conflict.
|
|
178
178
|
|
package/6.bridge/1.overview.md
CHANGED
|
@@ -46,6 +46,10 @@ pnpm install
|
|
|
46
46
|
bun install
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
```bash [deno]
|
|
50
|
+
deno install
|
|
51
|
+
```
|
|
52
|
+
|
|
49
53
|
::
|
|
50
54
|
|
|
51
55
|
::note
|
|
@@ -74,6 +78,10 @@ pnpm add -D @nuxt/bridge nuxi
|
|
|
74
78
|
bun add -D @nuxt/bridge nuxi
|
|
75
79
|
```
|
|
76
80
|
|
|
81
|
+
```bash [deno]
|
|
82
|
+
deno add -D npm:@nuxt/bridge npm:nuxi
|
|
83
|
+
```
|
|
84
|
+
|
|
77
85
|
::
|
|
78
86
|
|
|
79
87
|
### Update `nuxt.config`
|
package/6.bridge/8.nitro.md
CHANGED