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

Commit

Permalink
Add jsdoc types to docs snippets (vercel#27125)
Browse files Browse the repository at this point in the history
This PR adds the JSDoc types so that VS Code and other tools can use autocompletion when editing `next.config.js`
  • Loading branch information
styfle authored Jul 12, 2021
1 parent 3ea6bf7 commit 036c749
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/api-reference/next.config.js/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,27 @@ For custom advanced behavior of Next.js, you can create a `next.config.js` in th
Take a look at the following `next.config.js` example:

```js
module.exports = {
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
/* config options here */
}

module.exports = nextConfig
```

You can also use a function:

```js
module.exports = (phase, { defaultConfig }) => {
return {
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
/* config options here */
}
return nextConfig
}
```

Expand Down

0 comments on commit 036c749

Please sign in to comment.