Skip to content

Commit

Permalink
new file: nextjs/debug-fetch-requests.md
Browse files Browse the repository at this point in the history
  • Loading branch information
byt3h3ad committed May 18, 2024
1 parent 90dccfe commit f6e44ef
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions nextjs/debug-fetch-requests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Debug Next.js Fetch Requests

Make the following change in the `next.config.js` file -

```javascript
/** @type {import('next').NextConfig} */
const nextConfig = {
logging: {
fetches: {
fullUrl: true,
},
},
};

module.exports = nextConfig;
```

This will log the requests in the console when running the app in development mode.

[source](https://x.com/asidorenko_/status/1791537169468698965)

[docs](https://nextjs.org/docs/app/api-reference/next-config-js/logging)

0 comments on commit f6e44ef

Please sign in to comment.