Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions pages/aws/common_issues.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,29 @@ You might stumble upon this error inside cloudwatch logs: `Cannot find module 'n
Next might incorrectly include some dependencies in the bundle. To remove them you can use this configuration inside `next.config.js`:

```javascript
experimental: {
outputFileTracingExcludes: {
"*": ["node_modules/the-unwanted-package"],
},
},
outputFileTracingExcludes: {
"*": ["node_modules/the-unwanted-package"],
},
```

Also you should not add sharp as a dependencies unless absolutely necessary, the image optimization already has it's own version of sharp.

##### Sentry server sourcemaps

Sentry does not remove server side sourcemaps, only client ones, even if "deleteSourcemapsAfterUpload" is true. [See the Sentry source code](https://github.com/getsentry/sentry-javascript/blob/develop/packages/nextjs/src/config/webpackPluginOptions.ts#L83).

Excluding them from standalone output reduces bundle size:

```javascript
outputFileTracingExcludes: {
"*": [
'./**/*.js.map',
'./**/*.mjs.map',
'./**/*.cjs.map'
],
},
```

#### Patch fetch behaviour for ISR. Only for [email protected]+

If you use ISR and fetch in your app, you may encounter a bug that makes your revalidate values inconsistent.
Expand Down