Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

Commit

Permalink
docs: add Next.js installation steps
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-bell committed May 22, 2021
1 parent 1573a23 commit 8197da8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
18 changes: 15 additions & 3 deletions docs/pages/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@ A tiny helper function to access `public` files in server-side functions or `get

### Installation

```sh
npm i @plaiceholder/next
```
1. Add the package:

```sh
npm i @plaiceholder/next
```

2. Add `sharp` to the top of your `next.config.js` to ensure it starts in the main thread:

```js
require("sharp");
module.exports = {
// your Next.js config
};
```

### Example

Expand Down
3 changes: 3 additions & 0 deletions examples/next/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
require("sharp");

module.exports = {};

0 comments on commit 8197da8

Please sign in to comment.