@nuxt/docs 0.0.0 → 3.17.0
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/.navigation.yml +2 -0
- package/1.getting-started/.navigation.yml +3 -0
- package/1.getting-started/01.introduction.md +81 -0
- package/1.getting-started/02.installation.md +109 -0
- package/1.getting-started/03.configuration.md +226 -0
- package/1.getting-started/04.views.md +163 -0
- package/1.getting-started/05.assets.md +48 -0
- package/1.getting-started/06.styling.md +565 -0
- package/1.getting-started/07.routing.md +149 -0
- package/1.getting-started/08.seo-meta.md +360 -0
- package/1.getting-started/09.transitions.md +473 -0
- package/1.getting-started/10.data-fetching.md +795 -0
- package/1.getting-started/11.state-management.md +223 -0
- package/1.getting-started/12.error-handling.md +233 -0
- package/1.getting-started/13.server.md +94 -0
- package/1.getting-started/14.layers.md +92 -0
- package/1.getting-started/15.prerendering.md +194 -0
- package/1.getting-started/16.deployment.md +130 -0
- package/1.getting-started/17.testing.md +728 -0
- package/1.getting-started/18.upgrade.md +997 -0
- package/2.guide/.navigation.yml +2 -0
- package/2.guide/0.index.md +22 -0
- package/2.guide/1.concepts/.navigation.yml +3 -0
- package/2.guide/1.concepts/1.auto-imports.md +205 -0
- package/2.guide/1.concepts/10.nuxt-lifecycle.md +141 -0
- package/2.guide/1.concepts/2.vuejs-development.md +103 -0
- package/2.guide/1.concepts/3.rendering.md +255 -0
- package/2.guide/1.concepts/4.server-engine.md +62 -0
- package/2.guide/1.concepts/5.modules.md +48 -0
- package/2.guide/1.concepts/7.esm.md +299 -0
- package/2.guide/1.concepts/8.typescript.md +97 -0
- package/2.guide/1.concepts/9.code-style.md +22 -0
- package/2.guide/2.directory-structure/.navigation.yml +3 -0
- package/2.guide/2.directory-structure/0.nuxt.md +20 -0
- package/2.guide/2.directory-structure/0.output.md +18 -0
- package/2.guide/2.directory-structure/1.assets.md +16 -0
- package/2.guide/2.directory-structure/1.components.md +608 -0
- package/2.guide/2.directory-structure/1.composables.md +121 -0
- package/2.guide/2.directory-structure/1.content.md +64 -0
- package/2.guide/2.directory-structure/1.layouts.md +180 -0
- package/2.guide/2.directory-structure/1.middleware.md +209 -0
- package/2.guide/2.directory-structure/1.modules.md +66 -0
- package/2.guide/2.directory-structure/1.node_modules.md +12 -0
- package/2.guide/2.directory-structure/1.pages.md +440 -0
- package/2.guide/2.directory-structure/1.plugins.md +299 -0
- package/2.guide/2.directory-structure/1.public.md +27 -0
- package/2.guide/2.directory-structure/1.server.md +546 -0
- package/2.guide/2.directory-structure/1.shared.md +104 -0
- package/2.guide/2.directory-structure/1.utils.md +49 -0
- package/2.guide/2.directory-structure/2.env.md +75 -0
- package/2.guide/2.directory-structure/2.gitignore.md +37 -0
- package/2.guide/2.directory-structure/2.nuxtignore.md +36 -0
- package/2.guide/2.directory-structure/2.nuxtrc.md +50 -0
- package/2.guide/2.directory-structure/3.app-config.md +177 -0
- package/2.guide/2.directory-structure/3.app.md +72 -0
- package/2.guide/2.directory-structure/3.error.md +55 -0
- package/2.guide/2.directory-structure/3.nuxt-config.md +34 -0
- package/2.guide/2.directory-structure/3.package.md +32 -0
- package/2.guide/2.directory-structure/3.tsconfig.md +24 -0
- package/2.guide/3.going-further/.navigation.yml +3 -0
- package/2.guide/3.going-further/1.experimental-features.md +689 -0
- package/2.guide/3.going-further/1.features.md +103 -0
- package/2.guide/3.going-further/1.internals.md +81 -0
- package/2.guide/3.going-further/10.runtime-config.md +174 -0
- package/2.guide/3.going-further/11.nightly-release-channel.md +68 -0
- package/2.guide/3.going-further/2.hooks.md +98 -0
- package/2.guide/3.going-further/3.modules.md +811 -0
- package/2.guide/3.going-further/4.kit.md +51 -0
- package/2.guide/3.going-further/6.nuxt-app.md +64 -0
- package/2.guide/3.going-further/7.layers.md +227 -0
- package/2.guide/3.going-further/9.debugging.md +115 -0
- package/2.guide/3.going-further/index.md +4 -0
- package/2.guide/4.recipes/.navigation.yml +3 -0
- package/2.guide/4.recipes/1.custom-routing.md +181 -0
- package/2.guide/4.recipes/2.vite-plugin.md +65 -0
- package/2.guide/4.recipes/3.custom-usefetch.md +125 -0
- package/2.guide/4.recipes/4.sessions-and-authentication.md +203 -0
- package/3.api/.navigation.yml +3 -0
- package/3.api/1.components/.navigation.yml +3 -0
- package/3.api/1.components/1.client-only.md +76 -0
- package/3.api/1.components/1.dev-only.md +51 -0
- package/3.api/1.components/1.nuxt-client-fallback.md +80 -0
- package/3.api/1.components/10.nuxt-picture.md +27 -0
- package/3.api/1.components/11.teleports.md +40 -0
- package/3.api/1.components/12.nuxt-route-announcer.md +56 -0
- package/3.api/1.components/13.nuxt-time.md +173 -0
- package/3.api/1.components/2.nuxt-page.md +154 -0
- package/3.api/1.components/3.nuxt-layout.md +156 -0
- package/3.api/1.components/4.nuxt-link.md +322 -0
- package/3.api/1.components/5.nuxt-loading-indicator.md +50 -0
- package/3.api/1.components/6.nuxt-error-boundary.md +65 -0
- package/3.api/1.components/7.nuxt-welcome.md +25 -0
- package/3.api/1.components/8.nuxt-island.md +70 -0
- package/3.api/1.components/9.nuxt-img.md +43 -0
- package/3.api/2.composables/.navigation.yml +3 -0
- package/3.api/2.composables/on-prehydrate.md +60 -0
- package/3.api/2.composables/use-app-config.md +19 -0
- package/3.api/2.composables/use-async-data.md +212 -0
- package/3.api/2.composables/use-cookie.md +233 -0
- package/3.api/2.composables/use-error.md +32 -0
- package/3.api/2.composables/use-fetch.md +217 -0
- package/3.api/2.composables/use-head-safe.md +55 -0
- package/3.api/2.composables/use-head.md +69 -0
- package/3.api/2.composables/use-hydration.md +68 -0
- package/3.api/2.composables/use-lazy-async-data.md +47 -0
- package/3.api/2.composables/use-lazy-fetch.md +55 -0
- package/3.api/2.composables/use-loading-indicator.md +77 -0
- package/3.api/2.composables/use-nuxt-app.md +294 -0
- package/3.api/2.composables/use-nuxt-data.md +112 -0
- package/3.api/2.composables/use-preview-mode.md +118 -0
- package/3.api/2.composables/use-request-event.md +23 -0
- package/3.api/2.composables/use-request-fetch.md +52 -0
- package/3.api/2.composables/use-request-header.md +34 -0
- package/3.api/2.composables/use-request-headers.md +37 -0
- package/3.api/2.composables/use-request-url.md +41 -0
- package/3.api/2.composables/use-response-header.md +48 -0
- package/3.api/2.composables/use-route-announcer.md +60 -0
- package/3.api/2.composables/use-route.md +52 -0
- package/3.api/2.composables/use-router.md +92 -0
- package/3.api/2.composables/use-runtime-config.md +142 -0
- package/3.api/2.composables/use-runtime-hook.md +43 -0
- package/3.api/2.composables/use-seo-meta.md +80 -0
- package/3.api/2.composables/use-server-seo-meta.md +27 -0
- package/3.api/2.composables/use-state.md +48 -0
- package/3.api/3.utils/$fetch.md +98 -0
- package/3.api/3.utils/.navigation.yml +3 -0
- package/3.api/3.utils/abort-navigation.md +73 -0
- package/3.api/3.utils/add-route-middleware.md +88 -0
- package/3.api/3.utils/call-once.md +92 -0
- package/3.api/3.utils/clear-error.md +29 -0
- package/3.api/3.utils/clear-nuxt-data.md +23 -0
- package/3.api/3.utils/clear-nuxt-state.md +23 -0
- package/3.api/3.utils/create-error.md +55 -0
- package/3.api/3.utils/define-nuxt-component.md +53 -0
- package/3.api/3.utils/define-nuxt-route-middleware.md +67 -0
- package/3.api/3.utils/define-page-meta.md +234 -0
- package/3.api/3.utils/define-route-rules.md +52 -0
- package/3.api/3.utils/navigate-to.md +230 -0
- package/3.api/3.utils/on-before-route-leave.md +11 -0
- package/3.api/3.utils/on-before-route-update.md +11 -0
- package/3.api/3.utils/on-nuxt-ready.md +25 -0
- package/3.api/3.utils/prefetch-components.md +28 -0
- package/3.api/3.utils/preload-components.md +23 -0
- package/3.api/3.utils/preload-route-components.md +41 -0
- package/3.api/3.utils/prerender-routes.md +46 -0
- package/3.api/3.utils/refresh-cookie.md +46 -0
- package/3.api/3.utils/refresh-nuxt-data.md +91 -0
- package/3.api/3.utils/reload-nuxt-app.md +74 -0
- package/3.api/3.utils/set-page-layout.md +24 -0
- package/3.api/3.utils/set-response-status.md +36 -0
- package/3.api/3.utils/show-error.md +31 -0
- package/3.api/3.utils/update-app-config.md +27 -0
- package/3.api/4.commands/.navigation.yml +3 -0
- package/3.api/4.commands/add.md +112 -0
- package/3.api/4.commands/analyze.md +41 -0
- package/3.api/4.commands/build-module.md +42 -0
- package/3.api/4.commands/build.md +46 -0
- package/3.api/4.commands/cleanup.md +38 -0
- package/3.api/4.commands/dev.md +59 -0
- package/3.api/4.commands/devtools.md +38 -0
- package/3.api/4.commands/generate.md +41 -0
- package/3.api/4.commands/info.md +33 -0
- package/3.api/4.commands/init.md +46 -0
- package/3.api/4.commands/module.md +84 -0
- package/3.api/4.commands/prepare.md +36 -0
- package/3.api/4.commands/preview.md +43 -0
- package/3.api/4.commands/typecheck.md +42 -0
- package/3.api/4.commands/upgrade.md +37 -0
- package/3.api/5.kit/.navigation.yml +3 -0
- package/3.api/5.kit/1.modules.md +172 -0
- package/3.api/5.kit/10.runtime-config.md +27 -0
- package/3.api/5.kit/10.templates.md +283 -0
- package/3.api/5.kit/11.nitro.md +409 -0
- package/3.api/5.kit/12.resolving.md +268 -0
- package/3.api/5.kit/13.logging.md +65 -0
- package/3.api/5.kit/14.builder.md +491 -0
- package/3.api/5.kit/15.examples.md +41 -0
- package/3.api/5.kit/2.programmatic.md +125 -0
- package/3.api/5.kit/3.compatibility.md +230 -0
- package/3.api/5.kit/4.autoimports.md +144 -0
- package/3.api/5.kit/5.components.md +127 -0
- package/3.api/5.kit/6.context.md +130 -0
- package/3.api/5.kit/7.pages.md +295 -0
- package/3.api/5.kit/8.layout.md +80 -0
- package/3.api/5.kit/9.plugins.md +263 -0
- package/3.api/6.advanced/.navigation.yml +1 -0
- package/3.api/6.advanced/1.hooks.md +105 -0
- package/3.api/6.advanced/2.import-meta.md +60 -0
- package/3.api/6.nuxt-config.md +12 -0
- package/3.api/index.md +31 -0
- package/5.community/.navigation.yml +3 -0
- package/5.community/2.getting-help.md +48 -0
- package/5.community/3.reporting-bugs.md +50 -0
- package/5.community/4.contribution.md +205 -0
- package/5.community/5.framework-contribution.md +142 -0
- package/5.community/6.roadmap.md +79 -0
- package/5.community/7.changelog.md +92 -0
- package/6.bridge/.navigation.yml +3 -0
- package/6.bridge/1.overview.md +137 -0
- package/6.bridge/10.configuration.md +96 -0
- package/6.bridge/2.typescript.md +46 -0
- package/6.bridge/3.bridge-composition-api.md +132 -0
- package/6.bridge/4.plugins-and-middleware.md +65 -0
- package/6.bridge/5.nuxt3-compatible-api.md +204 -0
- package/6.bridge/6.meta.md +117 -0
- package/6.bridge/7.runtime-config.md +38 -0
- package/6.bridge/8.nitro.md +102 -0
- package/6.bridge/9.vite.md +37 -0
- package/7.migration/.navigation.yml +3 -0
- package/7.migration/1.overview.md +24 -0
- package/7.migration/10.bundling.md +28 -0
- package/7.migration/11.server.md +17 -0
- package/7.migration/2.configuration.md +240 -0
- package/7.migration/20.module-authors.md +94 -0
- package/7.migration/3.auto-imports.md +18 -0
- package/7.migration/4.meta.md +127 -0
- package/7.migration/5.plugins-and-middleware.md +80 -0
- package/7.migration/6.pages-and-layouts.md +233 -0
- package/7.migration/7.component-options.md +156 -0
- package/7.migration/8.runtime-config.md +58 -0
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/package.json +16 -4
- package/dist/.gitkeep +0 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Framework'
|
|
3
|
+
navigation.icon: i-lucide-github
|
|
4
|
+
description: Some specific points about contributions to the framework repository.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Once you've read the [general contribution guide](/docs/community/contribution), here are some specific points to make about contributions to the [`nuxt/nuxt`](https://github.com/nuxt/nuxt) repository.
|
|
8
|
+
|
|
9
|
+
## Monorepo Guide
|
|
10
|
+
|
|
11
|
+
- `packages/kit`: Toolkit for authoring Nuxt Modules, published as [`@nuxt/kit`](https://npmjs.com/package/@nuxt/kit).
|
|
12
|
+
- `packages/nuxt`: The core of Nuxt, published as [`nuxt`](https://npmjs.com/package/nuxt).
|
|
13
|
+
- `packages/schema`: Cross-version Nuxt typedefs and defaults, published as [`@nuxt/schema`](https://npmjs.com/package/@nuxt/schema).
|
|
14
|
+
- `packages/rspack`: The [Rspack](https://rspack.dev) bundler for Nuxt, published as [`@nuxt/rspack-builder`](https://npmjs.com/package/@nuxt/rspack-builder).
|
|
15
|
+
- `packages/vite`: The [Vite](https://vite.dev) bundler for Nuxt, published as [`@nuxt/vite-builder`](https://npmjs.com/package/@nuxt/vite-builder).
|
|
16
|
+
- `packages/webpack`: The [webpack](https://webpack.js.org) bundler for Nuxt, published as [`@nuxt/webpack-builder`](https://npmjs.com/package/@nuxt/webpack-builder).
|
|
17
|
+
|
|
18
|
+
## Setup
|
|
19
|
+
|
|
20
|
+
To contribute to Nuxt, you need to set up a local environment.
|
|
21
|
+
|
|
22
|
+
1. [Fork](https://help.github.com/articles/fork-a-repo) the [`nuxt/nuxt`](https://github.com/nuxt/nuxt) repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository) it to your local device.
|
|
23
|
+
2. Ensure using the latest [Node.js](https://nodejs.org/en) (20.x)
|
|
24
|
+
3. Enable [Corepack](https://github.com/nodejs/corepack) to have `pnpm` and `yarn`
|
|
25
|
+
```bash [Terminal]
|
|
26
|
+
corepack enable
|
|
27
|
+
```
|
|
28
|
+
4. Run `pnpm install --frozen-lockfile` to Install the dependencies with pnpm:
|
|
29
|
+
```bash [Terminal]
|
|
30
|
+
pnpm install --frozen-lockfile
|
|
31
|
+
```
|
|
32
|
+
::note
|
|
33
|
+
If you are adding a dependency, please use `pnpm add`. :br
|
|
34
|
+
The `pnpm-lock.yaml` file is the source of truth for all Nuxt dependencies.
|
|
35
|
+
::
|
|
36
|
+
5. Activate the passive development system
|
|
37
|
+
```bash [Terminal]
|
|
38
|
+
pnpm dev:prepare
|
|
39
|
+
```
|
|
40
|
+
6. Check out a branch where you can work and commit your changes:
|
|
41
|
+
```bash [Terminal]
|
|
42
|
+
git checkout -b my-new-branch
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then, test your changes against the [playground](#playground) and [test](#testing) your changes before submitting a pull request.
|
|
46
|
+
|
|
47
|
+
### Playground
|
|
48
|
+
|
|
49
|
+
While working on a pull request, you will likely want to check if your changes are working correctly.
|
|
50
|
+
|
|
51
|
+
You can modify the example app in `playground/`, and run:
|
|
52
|
+
|
|
53
|
+
```bash [Terminal]
|
|
54
|
+
pnpm dev
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
::important
|
|
58
|
+
Please make sure not to commit it to your branch, but it could be helpful to add some example code to your PR description. This can help reviewers and other Nuxt users understand the feature you've built in-depth.
|
|
59
|
+
::
|
|
60
|
+
|
|
61
|
+
### Testing
|
|
62
|
+
|
|
63
|
+
Every new feature should have a corresponding unit test (if possible). The `test/` directory in this repository is currently a work in progress, but do your best to create a new test following the example of what's already there.
|
|
64
|
+
|
|
65
|
+
Before creating a PR or marking it as ready-to-review, ensure that all tests pass by running:
|
|
66
|
+
|
|
67
|
+
```bash [Terminal]
|
|
68
|
+
pnpm test
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Linting
|
|
72
|
+
|
|
73
|
+
You might have noticed already that we use ESLint to enforce a coding standard.
|
|
74
|
+
|
|
75
|
+
Before committing your changes, to verify that the code style is correct, run:
|
|
76
|
+
|
|
77
|
+
```bash [Terminal]
|
|
78
|
+
pnpm lint
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
::note
|
|
82
|
+
You can use `pnpm lint --fix` to fix most of the style changes. :br
|
|
83
|
+
If there are still errors left, you must correct them manually.
|
|
84
|
+
::
|
|
85
|
+
|
|
86
|
+
### Documentation
|
|
87
|
+
|
|
88
|
+
If you are adding a new feature or refactoring or changing the behavior of Nuxt in any other manner, you'll likely want to document the changes. Please include any changes to the docs in the same PR. You don't have to write documentation up on the first commit (but please do so as soon as your pull request is mature enough).
|
|
89
|
+
|
|
90
|
+
::important
|
|
91
|
+
Make sure to make changes according to the [Documentation Style Guide](/docs/community/contribution#documentation-style-guide).
|
|
92
|
+
::
|
|
93
|
+
|
|
94
|
+
### Final Checklist
|
|
95
|
+
|
|
96
|
+
When submitting your PR, there is a simple template that you have to fill out. Please tick all appropriate "answers" in the checklists.
|
|
97
|
+
|
|
98
|
+
## Documentation Guide
|
|
99
|
+
|
|
100
|
+
If you spot an area where we can improve documentation or error messages, please do open a PR - even if it's just to fix a typo!
|
|
101
|
+
|
|
102
|
+
::important
|
|
103
|
+
Make sure to make changes according to the [Documentation Style Guide](/docs/community/contribution#documentation-style-guide).
|
|
104
|
+
::
|
|
105
|
+
|
|
106
|
+
### Quick Edits
|
|
107
|
+
|
|
108
|
+
If you spot a typo or want to rephrase a sentence, you can click on the **Edit this page** link located on the right aside in the **Community** section.
|
|
109
|
+
|
|
110
|
+
Make the change directly in the GitHub interface and open a Pull Request.
|
|
111
|
+
|
|
112
|
+
### Longer Edits
|
|
113
|
+
|
|
114
|
+
The documentation content is inside the `docs/` directory of the [nuxt/nuxt](https://github.com/nuxt/nuxt) repository and written in markdown.
|
|
115
|
+
|
|
116
|
+
::note
|
|
117
|
+
To preview the docs locally, follow the steps on [nuxt/nuxt.com](https://github.com/nuxt/nuxt.com) repository.
|
|
118
|
+
::
|
|
119
|
+
|
|
120
|
+
::note
|
|
121
|
+
We recommend that you install the [MDC extension](https://marketplace.visualstudio.com/items?itemName=Nuxt.mdc) for VS Code.
|
|
122
|
+
::
|
|
123
|
+
|
|
124
|
+
### Linting Docs
|
|
125
|
+
|
|
126
|
+
Documentation is linted using [MarkdownLint](https://github.com/DavidAnson/markdownlint) and [case police](https://github.com/antfu/case-police) to keep the documentation cohesive.
|
|
127
|
+
|
|
128
|
+
```bash [Terminal]
|
|
129
|
+
pnpm lint:docs
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
::note
|
|
133
|
+
You can also run `pnpm lint:docs:fix` to highlight and resolve any lint issues.
|
|
134
|
+
::
|
|
135
|
+
|
|
136
|
+
### Open a PR
|
|
137
|
+
|
|
138
|
+
Please make sure your PR title adheres to the [conventional commits](https://www.conventionalcommits.org) guidelines.
|
|
139
|
+
|
|
140
|
+
```bash [Example of PR title]
|
|
141
|
+
docs: update the section about the nuxt.config.ts file
|
|
142
|
+
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Roadmap'
|
|
3
|
+
description: 'Nuxt is constantly evolving, with new features and modules being added all the time.'
|
|
4
|
+
navigation.icon: i-lucide-map
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
::read-more{to="/blog"}
|
|
8
|
+
See our blog for the latest framework and ecosystem announcements.
|
|
9
|
+
::
|
|
10
|
+
|
|
11
|
+
## Status Reports
|
|
12
|
+
|
|
13
|
+
::read-more{icon="i-simple-icons-github" to="https://github.com/nuxt/nuxt/issues/13653" target="_blank"}
|
|
14
|
+
Documentation Progress
|
|
15
|
+
::
|
|
16
|
+
::read-more{icon="i-simple-icons-github" to="https://github.com/nuxt/nuxt/discussions/16119" target="_blank"}
|
|
17
|
+
Rendering Optimizations: Today and Tomorrow
|
|
18
|
+
::
|
|
19
|
+
::read-more{icon="i-simple-icons-github" to="https://github.com/nuxt/image/discussions/563" target="_blank"}
|
|
20
|
+
Nuxt Image: Performance and Status
|
|
21
|
+
::
|
|
22
|
+
|
|
23
|
+
## Roadmap
|
|
24
|
+
|
|
25
|
+
In roadmap below are some features we are planning or working on at the moment.
|
|
26
|
+
|
|
27
|
+
::tip
|
|
28
|
+
Check [Discussions](https://github.com/nuxt/nuxt/discussions) and [RFCs](https://github.com/nuxt/nuxt/discussions/categories/rfcs) for more upcoming features and ideas.
|
|
29
|
+
::
|
|
30
|
+
|
|
31
|
+
Milestone | Expected date | Notes | Description
|
|
32
|
+
-------------|---------------|------------------------------------------------------------------------|-----------------------
|
|
33
|
+
SEO & PWA | 2024 | [nuxt/nuxt#18395](https://github.com/nuxt/nuxt/discussions/18395) | Migrating from [nuxt-community/pwa-module](https://github.com/nuxt-community/pwa-module) for built-in SEO utils and service worker support
|
|
34
|
+
Assets | 2024 | [nuxt/nuxt#22012](https://github.com/nuxt/nuxt/discussions/22012) | Allow developers and modules to handle loading third-party assets.
|
|
35
|
+
Translations | - | [nuxt/translations#4](https://github.com/nuxt/translations/discussions/4) ([request access](https://github.com/nuxt/nuxt/discussions/16054)) | A collaborative project for a stable translation process for Nuxt docs. Currently pending for ideas and documentation tooling support (content v2 with remote sources).
|
|
36
|
+
|
|
37
|
+
## Core Modules Roadmap
|
|
38
|
+
|
|
39
|
+
In addition to the Nuxt framework, there are modules that are vital for the ecosystem. Their status will be updated below.
|
|
40
|
+
|
|
41
|
+
Module | Status | Nuxt Support | Repository | Description
|
|
42
|
+
------------------------------------|---------------------|--------------|------------|-------------------
|
|
43
|
+
[Scripts](https://scripts.nuxt.com) | Public Beta | 3.x | [nuxt/scripts](https://github.com/nuxt/scripts) | Easy 3rd party script management.
|
|
44
|
+
Auth Utils | Planned | 3.x | `nuxt/auth-utils` to be announced | The temporary repository [atinux/nuxt-auth-utils](https://github.com/atinux/nuxt-auth-utils) is available while awaiting its official integration into Nuxt via RFC.
|
|
45
|
+
A11y | Planned | 3.x | `nuxt/a11y` to be announced | Accessibility hinting and utilities [nuxt/nuxt#23255](https://github.com/nuxt/nuxt/issues/23255)
|
|
46
|
+
Hints | Planned | 3.x | `nuxt/hints` to be announced | Guidance and suggestions for enhancing development practices.
|
|
47
|
+
|
|
48
|
+
## Release Cycle
|
|
49
|
+
|
|
50
|
+
Since January 2023, we've adopted a consistent release cycle for Nuxt, following [semver](https://semver.org). We aim for major framework releases every year, with an expectation of patch releases every week or so and minor releases every month or so. They should never contain breaking changes except within options clearly marked as `experimental`.
|
|
51
|
+
|
|
52
|
+
### Ongoing Support for Nuxt
|
|
53
|
+
|
|
54
|
+
Going forward from v3, we commit to support each major version of Nuxt for a minimum of a year after the last release, and to providing an upgrade path for current users at that point.
|
|
55
|
+
|
|
56
|
+
### Current Packages
|
|
57
|
+
|
|
58
|
+
The current active version of [Nuxt](https://nuxt.com) is **v3** which is available as `nuxt` on npm with the `latest` tag.
|
|
59
|
+
|
|
60
|
+
Nuxt 2 is in maintenance mode and is available on npm with the `2x` tag. It will reach End of Life (EOL) on June 30, 2024.
|
|
61
|
+
|
|
62
|
+
Each active version has its own nightly releases which are generated automatically. For more about enabling the Nuxt nightly release channel, see [the nightly release channel docs](/docs/guide/going-further/nightly-release-channel).
|
|
63
|
+
|
|
64
|
+
Release | | Initial release | End Of Life | Docs
|
|
65
|
+
----------------------------------------|---------------------------------------------------------------------------------------------------|-----------------|--------------|-------
|
|
66
|
+
**4.x** (scheduled) | | approximately 1 month after release of nitro v3 | |
|
|
67
|
+
**3.x** (stable) | <a href="https://npmjs.com/package/nuxt"><img alt="Nuxt latest 3.x version" src="https://flat.badgen.net/npm/v/nuxt?label=" class="not-prose"></a> | 2022-11-16 | TBA | [nuxt.com](/docs)
|
|
68
|
+
**2.x** (unsupported) | <a href="https://www.npmjs.com/package/nuxt?activeTab=versions"><img alt="Nuxt 2.x version" src="https://flat.badgen.net/npm/v/nuxt/2x?label=" class="not-prose"></a> | 2018-09-21 | 2024-06-30 | [v2.nuxt.com](https://v2.nuxt.com/docs)
|
|
69
|
+
**1.x** (unsupported) | <a href="https://www.npmjs.com/package/nuxt?activeTab=versions"><img alt="Nuxt 1.x version" src="https://flat.badgen.net/npm/v/nuxt/1x?label=" class="not-prose"></a> | 2018-01-08 | 2019-09-21 |
|
|
70
|
+
|
|
71
|
+
### Support Status
|
|
72
|
+
|
|
73
|
+
Status | Description
|
|
74
|
+
------------|----------------------------------------------------------------------------------
|
|
75
|
+
Unsupported | This version is not maintained any more and will not receive security patches
|
|
76
|
+
Maintenance | This version will only receive security patches
|
|
77
|
+
Stable | This version is being developed for and will receive security patches
|
|
78
|
+
Development | This version could be unstable
|
|
79
|
+
Scheduled | This version does not exist yet but is planned
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Releases'
|
|
3
|
+
description: Discover the latest releases of Nuxt & Nuxt official modules.
|
|
4
|
+
navigation.icon: i-lucide-bell-dot
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
::card-group
|
|
8
|
+
::card
|
|
9
|
+
---
|
|
10
|
+
icon: i-simple-icons-github
|
|
11
|
+
title: nuxt/nuxt
|
|
12
|
+
to: https://github.com/nuxt/nuxt/releases
|
|
13
|
+
target: _blank
|
|
14
|
+
ui.icon.base: text-black dark:text-white
|
|
15
|
+
---
|
|
16
|
+
Nuxt framework releases.
|
|
17
|
+
::
|
|
18
|
+
::card
|
|
19
|
+
---
|
|
20
|
+
icon: i-simple-icons-github
|
|
21
|
+
title: nuxt/cli
|
|
22
|
+
to: https://github.com/nuxt/cli/releases
|
|
23
|
+
target: _blank
|
|
24
|
+
ui.icon.base: text-black dark:text-white
|
|
25
|
+
---
|
|
26
|
+
Nuxt CLI (`nuxi`) releases.
|
|
27
|
+
::
|
|
28
|
+
::card
|
|
29
|
+
---
|
|
30
|
+
icon: i-simple-icons-github
|
|
31
|
+
title: nuxt/content
|
|
32
|
+
to: https://github.com/nuxt/content/releases
|
|
33
|
+
target: _blank
|
|
34
|
+
ui.icon.base: text-black dark:text-white
|
|
35
|
+
---
|
|
36
|
+
Nuxt Content releases.
|
|
37
|
+
::
|
|
38
|
+
::card
|
|
39
|
+
---
|
|
40
|
+
icon: i-simple-icons-github
|
|
41
|
+
title: nuxt/devtools
|
|
42
|
+
to: https://github.com/nuxt/devtools/releases
|
|
43
|
+
target: _blank
|
|
44
|
+
ui.icon.base: text-black dark:text-white
|
|
45
|
+
---
|
|
46
|
+
Nuxt DevTools releases.
|
|
47
|
+
::
|
|
48
|
+
::card
|
|
49
|
+
---
|
|
50
|
+
icon: i-simple-icons-github
|
|
51
|
+
title: nuxt/fonts
|
|
52
|
+
to: https://github.com/nuxt/fonts/releases
|
|
53
|
+
target: _blank
|
|
54
|
+
ui.icon.base: text-black dark:text-white
|
|
55
|
+
---
|
|
56
|
+
Nuxt Fonts releases.
|
|
57
|
+
::
|
|
58
|
+
::card
|
|
59
|
+
---
|
|
60
|
+
icon: i-simple-icons-github
|
|
61
|
+
title: nuxt/image
|
|
62
|
+
to: https://github.com/nuxt/image/releases
|
|
63
|
+
target: _blank
|
|
64
|
+
ui.icon.base: text-black dark:text-white
|
|
65
|
+
---
|
|
66
|
+
Nuxt Image releases.
|
|
67
|
+
::
|
|
68
|
+
::card
|
|
69
|
+
---
|
|
70
|
+
icon: i-simple-icons-github
|
|
71
|
+
title: nuxt/scripts
|
|
72
|
+
to: https://github.com/nuxt/scripts/releases
|
|
73
|
+
target: _blank
|
|
74
|
+
ui.icon.base: text-black dark:text-white
|
|
75
|
+
---
|
|
76
|
+
Nuxt Scripts releases.
|
|
77
|
+
::
|
|
78
|
+
::card
|
|
79
|
+
---
|
|
80
|
+
icon: i-simple-icons-github
|
|
81
|
+
title: nuxt/ui
|
|
82
|
+
to: https://github.com/nuxt/ui/releases
|
|
83
|
+
target: _blank
|
|
84
|
+
ui.icon.base: text-black dark:text-white
|
|
85
|
+
---
|
|
86
|
+
Nuxt UI releases.
|
|
87
|
+
::
|
|
88
|
+
::
|
|
89
|
+
|
|
90
|
+
::read-more{icon="i-simple-icons-github" to="https://github.com/nuxt" target="_blank"}
|
|
91
|
+
Discover the `nuxt` organization on GitHub
|
|
92
|
+
::
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Overview
|
|
3
|
+
description: Reduce the differences with Nuxt 3 and reduce the burden of migration to Nuxt 3.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
::note
|
|
7
|
+
If you're starting a fresh Nuxt 3 project, please skip this section and go to [Nuxt 3 Installation](/docs/getting-started/introduction).
|
|
8
|
+
::
|
|
9
|
+
|
|
10
|
+
::warning
|
|
11
|
+
Nuxt Bridge provides identical features to Nuxt 3 ([docs](/docs/guide/concepts/auto-imports)) but there are some limitations, notably that [`useAsyncData`](/docs/api/composables/use-async-data) and [`useFetch`](/docs/api/composables/use-fetch) composables are not available. Please read the rest of this page for details.
|
|
12
|
+
::
|
|
13
|
+
|
|
14
|
+
Bridge is a forward-compatibility layer that allows you to experience many of the new Nuxt 3 features by simply installing and enabling a Nuxt module.
|
|
15
|
+
|
|
16
|
+
Using Nuxt Bridge, you can make sure your project is (almost) ready for Nuxt 3 and you can gradually proceed with the transition to Nuxt 3.
|
|
17
|
+
|
|
18
|
+
## First Step
|
|
19
|
+
|
|
20
|
+
### Upgrade Nuxt 2
|
|
21
|
+
|
|
22
|
+
Make sure your dev server (`nuxt dev`) isn't running, remove any package lock files (`package-lock.json` and `yarn.lock`), and install the latest Nuxt 2 version:
|
|
23
|
+
|
|
24
|
+
```diff [package.json]
|
|
25
|
+
- "nuxt": "^2.16.3"
|
|
26
|
+
+ "nuxt": "^2.17.3"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Then, reinstall your dependencies:
|
|
30
|
+
|
|
31
|
+
::code-group{sync="pm"}
|
|
32
|
+
|
|
33
|
+
```bash [npm]
|
|
34
|
+
npm install
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```bash [yarn]
|
|
38
|
+
yarn install
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```bash [pnpm]
|
|
42
|
+
pnpm install
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```bash [bun]
|
|
46
|
+
bun install
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
::
|
|
50
|
+
|
|
51
|
+
::note
|
|
52
|
+
Once the installation is complete, make sure both development and production builds are working as expected before proceeding.
|
|
53
|
+
::
|
|
54
|
+
|
|
55
|
+
### Install Nuxt Bridge
|
|
56
|
+
|
|
57
|
+
Install `@nuxt/bridge` and `nuxi` as development dependencies:
|
|
58
|
+
|
|
59
|
+
::code-group{sync="pm"}
|
|
60
|
+
|
|
61
|
+
```bash [npm]
|
|
62
|
+
npm install -D @nuxt/bridge nuxi
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```bash [yarn]
|
|
66
|
+
yarn add --dev @nuxt/bridge nuxi
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
```bash [pnpm]
|
|
70
|
+
pnpm add -D @nuxt/bridge nuxi
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```bash [bun]
|
|
74
|
+
bun add -D @nuxt/bridge nuxi
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
::
|
|
78
|
+
|
|
79
|
+
### Update `nuxt.config`
|
|
80
|
+
|
|
81
|
+
Please make sure to avoid any CommonJS syntax such as `module.exports`, `require` or `require.resolve` in your config file. It will soon be deprecated and unsupported.
|
|
82
|
+
|
|
83
|
+
You can use static `import`, dynamic `import()` and `export default` instead. Using TypeScript by renaming to [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) is also possible and recommended.
|
|
84
|
+
|
|
85
|
+
```ts [nuxt.config.ts]
|
|
86
|
+
import { defineNuxtConfig } from '@nuxt/bridge'
|
|
87
|
+
|
|
88
|
+
export default defineNuxtConfig({
|
|
89
|
+
bridge: false
|
|
90
|
+
})
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Update Commands
|
|
94
|
+
|
|
95
|
+
The `nuxt` command should now be changed to the `nuxt2` command.
|
|
96
|
+
|
|
97
|
+
```diff
|
|
98
|
+
{
|
|
99
|
+
"scripts": {
|
|
100
|
+
- "dev": "nuxt",
|
|
101
|
+
+ "dev": "nuxt2",
|
|
102
|
+
- "build": "nuxt build",
|
|
103
|
+
+ "build": "nuxt2 build",
|
|
104
|
+
- "start": "nuxt start",
|
|
105
|
+
+ "start": "nuxt2 start"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Try running `nuxt2` once here. You will see that the application works as before.
|
|
111
|
+
|
|
112
|
+
(If 'bridge' is set to false, your application will operate without any changes as before.)
|
|
113
|
+
|
|
114
|
+
## Upgrade Steps
|
|
115
|
+
|
|
116
|
+
With Nuxt Bridge, the migration to Nuxt 3 can proceed in steps.
|
|
117
|
+
The below `Upgrade Steps` does not need to be done all at once.
|
|
118
|
+
|
|
119
|
+
- [TypeScript](/docs/bridge/typescript)
|
|
120
|
+
|
|
121
|
+
- [Migrate Legacy Composition API](/docs/bridge/bridge-composition-api)
|
|
122
|
+
|
|
123
|
+
- [Plugins and Middleware](/docs/bridge/plugins-and-middleware)
|
|
124
|
+
|
|
125
|
+
- [Migrate New Composition API](/docs/bridge/nuxt3-compatible-api)
|
|
126
|
+
|
|
127
|
+
- [Meta Tags](/docs/bridge/meta)
|
|
128
|
+
|
|
129
|
+
- [Runtime Config](/docs/bridge/runtime-config)
|
|
130
|
+
|
|
131
|
+
- [Nitro](/docs/bridge/nitro)
|
|
132
|
+
|
|
133
|
+
- [Vite](/docs/bridge/vite)
|
|
134
|
+
|
|
135
|
+
## Migrate from CommonJS to ESM
|
|
136
|
+
|
|
137
|
+
Nuxt 3 natively supports TypeScript and ECMAScript Modules. Please check [Native ES Modules](/docs/guide/concepts/esm) for more info and upgrading.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Configuration
|
|
3
|
+
description: 'Learn how to configure Nuxt Bridge to your own needs.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Feature Flags
|
|
7
|
+
|
|
8
|
+
You can optionally disable some features from bridge or opt-in to less stable ones. In normal circumstances, it is always best to stick with defaults!
|
|
9
|
+
|
|
10
|
+
You can check [bridge/src/module.ts](https://github.com/nuxt/bridge/blob/main/packages/bridge/src/module.ts) for latest defaults.
|
|
11
|
+
|
|
12
|
+
```ts [nuxt.config.ts]
|
|
13
|
+
import { defineNuxtConfig } from '@nuxt/bridge'
|
|
14
|
+
export default defineNuxtConfig({
|
|
15
|
+
bridge: {
|
|
16
|
+
|
|
17
|
+
// -- Opt-in features --
|
|
18
|
+
|
|
19
|
+
// Use Vite as the bundler instead of webpack 4
|
|
20
|
+
// vite: true,
|
|
21
|
+
|
|
22
|
+
// Enable Nuxt 3 compatible useHead
|
|
23
|
+
// meta: true,
|
|
24
|
+
|
|
25
|
+
// Enable definePageMeta macro
|
|
26
|
+
// macros: {
|
|
27
|
+
// pageMeta: true
|
|
28
|
+
// },
|
|
29
|
+
|
|
30
|
+
// Enable transpiling TypeScript with esbuild
|
|
31
|
+
// typescript: {
|
|
32
|
+
// esbuild: true
|
|
33
|
+
// },
|
|
34
|
+
|
|
35
|
+
// -- Default features --
|
|
36
|
+
|
|
37
|
+
// Use legacy server instead of Nitro
|
|
38
|
+
// nitro: false,
|
|
39
|
+
|
|
40
|
+
// Disable Nuxt 3 compatible `nuxtApp` interface
|
|
41
|
+
// app: false,
|
|
42
|
+
|
|
43
|
+
// Disable Composition API support
|
|
44
|
+
// capi: false,
|
|
45
|
+
|
|
46
|
+
// ... or just disable legacy Composition API support
|
|
47
|
+
// capi: {
|
|
48
|
+
// legacy: false
|
|
49
|
+
// },
|
|
50
|
+
|
|
51
|
+
// Do not transpile modules
|
|
52
|
+
// transpile: false,
|
|
53
|
+
|
|
54
|
+
// Disable <script setup> support
|
|
55
|
+
// scriptSetup: false,
|
|
56
|
+
|
|
57
|
+
// Disable composables auto importing
|
|
58
|
+
// imports: false,
|
|
59
|
+
|
|
60
|
+
// Do not warn about module incompatibilities
|
|
61
|
+
// constraints: false
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
vite: {
|
|
65
|
+
// Config for Vite
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Migration of each option
|
|
71
|
+
|
|
72
|
+
### router.base
|
|
73
|
+
|
|
74
|
+
```diff
|
|
75
|
+
export default defineNuxtConfig({
|
|
76
|
+
- router: {
|
|
77
|
+
- base: '/my-app/'
|
|
78
|
+
- }
|
|
79
|
+
+ app: {
|
|
80
|
+
+ baseURL: '/my-app/'
|
|
81
|
+
+ }
|
|
82
|
+
})
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### build.publicPath
|
|
86
|
+
|
|
87
|
+
```diff
|
|
88
|
+
export default defineNuxtConfig({
|
|
89
|
+
- build: {
|
|
90
|
+
- publicPath: 'https://my-cdn.net'
|
|
91
|
+
- }
|
|
92
|
+
+ app: {
|
|
93
|
+
+ cdnURL: 'https://my-cdn.net'
|
|
94
|
+
+ }
|
|
95
|
+
})
|
|
96
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TypeScript
|
|
3
|
+
description: 'Learn how to use TypeScript with Nuxt Bridge.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Remove Modules
|
|
7
|
+
|
|
8
|
+
- Remove `@nuxt/typescript-build`: Bridge enables same functionality
|
|
9
|
+
- Remove `@nuxt/typescript-runtime` and `nuxt-ts`: Nuxt 2 has built-in runtime support
|
|
10
|
+
|
|
11
|
+
### Set `bridge.typescript`
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { defineNuxtConfig } from '@nuxt/bridge'
|
|
15
|
+
|
|
16
|
+
export default defineNuxtConfig({
|
|
17
|
+
bridge: {
|
|
18
|
+
typescript: true,
|
|
19
|
+
nitro: false // If migration to Nitro is complete, set to true
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Update `tsconfig.json`
|
|
25
|
+
|
|
26
|
+
If you are using TypeScript, you can edit your `tsconfig.json` to benefit from auto-generated Nuxt types:
|
|
27
|
+
|
|
28
|
+
```diff [tsconfig.json]
|
|
29
|
+
{
|
|
30
|
+
+ "extends": "./.nuxt/tsconfig.json",
|
|
31
|
+
"compilerOptions": {
|
|
32
|
+
...
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
::note
|
|
38
|
+
As `.nuxt/tsconfig.json` is generated and not checked into version control, you'll need to generate that file before running your tests. Add `nuxi prepare` as a step before your tests, otherwise you'll see `TS5083: Cannot read file '~/.nuxt/tsconfig.json'`
|
|
39
|
+
::
|
|
40
|
+
|
|
41
|
+
::note
|
|
42
|
+
Keep in mind that all options extended from `./.nuxt/tsconfig.json` will be overwritten by the options defined in your `tsconfig.json`.
|
|
43
|
+
Overwriting options such as `"compilerOptions.paths"` with your own configuration will lead TypeScript to not factor in the module resolutions from `./.nuxt/tsconfig.json`. This can lead to module resolutions such as `#imports` not being recognized.
|
|
44
|
+
|
|
45
|
+
In case you need to extend options provided by `./.nuxt/tsconfig.json` further, you can use the `alias` property within your `nuxt.config`. `nuxi` will pick them up and extend `./.nuxt/tsconfig.json` accordingly.
|
|
46
|
+
::
|