Skip to content

Commit 7fe7fff

Browse files
authored
docs: add edge channel
1 parent d68d9b1 commit 7fe7fff

1 file changed

Lines changed: 57 additions & 16 deletions

File tree

docs/content/1.get-started/1.installation.md

Lines changed: 57 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default defineNuxtConfig({
3131
})
3232
```
3333

34-
You can now start using [`<NuxtImg>`](/usage/nuxt-img) and [`<NuxtPicture>`](/usage/nuxt-picture) components in your Nuxt app
34+
You can now start using [`<NuxtImg>`](/usage/nuxt-img) and [`<NuxtPicture>`](/usage/nuxt-picture) components in your application
3535

3636
## Configuration
3737

@@ -43,7 +43,48 @@ image: {
4343
}
4444
```
4545

46-
See the [image configuration](/get-started/configuration) for all available options and features to customize.
46+
::callout
47+
Checkout the [image configuration](/get-started/configuration) for all available options and features to customize.
48+
::
49+
50+
## Edge Channel
51+
52+
After each commit is merged into the `main` branch of `@nuxt/image` and **passing all tests**, we trigger an automated npm release using Github Actions publishing a [`@nuxt/image-edge`](https://npmjs.com/package/@nuxt/image-edge) package.
53+
54+
You can opt in to use this release channel and avoid waiting for the next release and helping the module by beta testing changes.
55+
56+
The build and publishing method and quality of edge releases are the same as stable ones. The only difference is that you should often check the [GitHub repository](https://github.com/nuxt/image) for updates. There is a slight chance of regressions not being caught during the review process and by the automated tests. Therefore, we internally use this channel to double-check everything before each release.
57+
58+
### Opting into the edge channel
59+
60+
Update `@nuxt/image` dependency inside `package.json`:
61+
62+
```diff [package.json]
63+
{
64+
"devDependencies": {
65+
- "@nuxt/image": "^1.0.0"
66+
+ "@nuxt/image": "npm:@nuxt/image-edge@latest"
67+
}
68+
}
69+
```
70+
71+
Remove lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and reinstall dependencies.
72+
73+
### Opting out from the edge channel
74+
75+
Update `@nuxt/image` dependency inside `package.json`:
76+
77+
```diff [package.json]
78+
{
79+
"devDependencies": {
80+
- "@nuxt/image": "npm:@nuxt/image-edge@latest"
81+
+ "@nuxt/image": "^1.0.0"
82+
}
83+
}
84+
```
85+
86+
Remove lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and reinstall dependencies.
87+
4788

4889
## Troubleshooting
4990

@@ -53,25 +94,25 @@ If an error occurs during installation:
5394

5495
- Try to upgrade to latest versions:
5596

56-
::code-group
57-
```bash [pnpm]
58-
pnpm up @nuxt/image@rc
59-
```
97+
::code-group
98+
```bash [pnpm]
99+
pnpm up @nuxt/image@rc
100+
```
60101

61-
```bash [yarn]
62-
yarn upgrade @nuxt/image@rc
63-
```
102+
```bash [yarn]
103+
yarn upgrade @nuxt/image@rc
104+
```
64105

65-
```bash [npm]
66-
npm up @nuxt/image@rc
67-
```
68-
::
106+
```bash [npm]
107+
npm up @nuxt/image@rc
108+
```
109+
::
69110

70111
- Try recreating lock-file:
71112

72-
```bash
73-
npx nuxt@latest upgrade --force
74-
```
113+
```bash
114+
npx nuxt@latest upgrade --force
115+
```
75116

76117
- If there is still an error related to `sharp` and `node-gyp`, it is is probably becase your OS architecture or NodeJS version is not included in pre-built binaries and needs to built from source (for example, this sometimes occurs on Apple M1). Checkout [node-gyp](https://github.com/nodejs/node-gyp#installation) for install requirements.
77118

0 commit comments

Comments
 (0)