You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-18Lines changed: 20 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,16 @@
1
-
# Nuxt Bridge
1
+
# 🌉 Nuxt Bridge
2
2
3
3
> Experience Nuxt 3 features on existing Nuxt 2 projects.
4
4
5
-
If you're starting a fresh Nuxt 3 project, please skip this section and go to [Nuxt 3 Installation](https://v3.nuxtjs.org/getting-started/quick-start).
6
-
7
-
**Note:** Nuxt Bridge provides identical features to Nuxt 3 ([Nuxt 3 docs](https://v3.nuxtjs.org/guide/features/views)) but there are some limitations, notably that `useAsyncData` and `useFetch` composables are not available. Please read the rest of this page for details.
8
-
9
5
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.
10
6
11
7
Using Nuxt Bridge, you can make sure your project is (almost) ready for Nuxt 3 and have the best developer experience without needing a major rewrite or risk breaking changes.
12
8
9
+
⚠️ **Note:** Nuxt Bridge provides identical features to Nuxt 3 ([Nuxt 3 docs](https://v3.nuxtjs.org/guide/features/views)) but there are some limitations, notably that `useAsyncData` and `useFetch` composables are not available. Please read the rest of this page for details.
10
+
11
+
🌱 **Note:** If you're starting a fresh Nuxt project, please skip this module and directly go to the [Nuxt 3 Installation](https://v3.nuxtjs.org/getting-started/quick-start).
12
+
13
+
13
14
## Installation
14
15
15
16
### Upgrade to the latest Nuxt 2
@@ -23,11 +24,11 @@ Make sure your dev server (`nuxt dev`) isn't running, remove any package lock fi
23
24
24
25
Then, reinstall your dependencies:
25
26
26
-
```bash [Yarn]
27
+
```bash
28
+
# Using yarn
27
29
yarn install
28
-
```
29
30
30
-
```bash [NPM]
31
+
# Using npm
31
32
npm install
32
33
```
33
34
@@ -37,11 +38,12 @@ Once the installation is complete, make sure both development and production bui
37
38
38
39
Install `@nuxt/bridge-edge` as a development dependency:
39
40
40
-
```bash [Yarn]
41
+
```bash
42
+
43
+
# Using yarn
41
44
yarn add --dev @nuxt/bridge@npm:@nuxt/bridge-edge
42
-
```
43
45
44
-
```bash [NPM]
46
+
# Using npm
45
47
npm install -D @nuxt/bridge@npm:@nuxt/bridge-edge
46
48
```
47
49
@@ -51,7 +53,7 @@ You will also need to update your scripts within your `package.json` to reflect
51
53
52
54
### Nuxi
53
55
54
-
Nuxt 3 introduced the new Nuxt CLI command [`nuxi`](/api/commands/add). Update your scripts as follows to leverage the better support from Nuxt Bridge:
56
+
Nuxt 3 introduced the new Nuxt CLI command [`nuxi`](https://v3.nuxtjs.org/api/commands/add). Update your scripts as follows to leverage the better support from Nuxt Bridge:
55
57
56
58
```diff
57
59
{
@@ -126,11 +128,11 @@ In case you need to extend options provided by `./.nuxt/tsconfig.json` further,
126
128
127
129
## Migrate Composition API
128
130
129
-
If you were using `@vue/composition-api` or `@nuxtjs/composition-api`, please read the [composition api migration guide](/bridge/bridge-composition-api).
131
+
If you were using `@vue/composition-api` or `@nuxtjs/composition-api`, please read the [composition api migration guide](https://v3.nuxtjs.org/bridge/bridge-composition-api).
130
132
131
133
### Migrate from CommonJS to ESM
132
134
133
-
Nuxt 3 natively supports TypeScript and ECMAScript Modules. Please check [Native ES Modules](/guide/going-further/esm) for more info and upgrading.
135
+
Nuxt 3 natively supports TypeScript and ECMAScript Modules. Please check [Native ES Modules](https://v3.nuxtjs.org/guide/going-further/esm) for more info and upgrading.
- Remove `@nuxt/typescript-build`: Bridge enables same functionality
140
142
- Remove `@nuxt/typescript-runtime` and `nuxt-ts`: Nuxt 2 has built-in runtime support
141
143
- Remove `@nuxt/nitro`: Bridge injects same functionality
142
-
- Remove `@vue/composition-api` from your dependencies ([migration guide](/bridge/bridge-composition-api)).
143
-
- Remove `@nuxtjs/composition-api` from your dependencies (and from your modules in `nuxt.config`) ([migration guide](/bridge/bridge-composition-api)).
144
+
- Remove `@vue/composition-api` from your dependencies ([migration guide](https://v3.nuxtjs.org/bridge/bridge-composition-api)).
145
+
- Remove `@nuxtjs/composition-api` from your dependencies (and from your modules in `nuxt.config`) ([migration guide](https://v3.nuxtjs.org/bridge/bridge-composition-api)).
0 commit comments