Skip to content

Commit 37ea26b

Browse files
authoredOct 7, 2024
Add require-in-the-middle to default externals (vercel#70922)
Closes PACK-3288 Closes vercel#70424 Sentry uses `open-telemetry`, which uses `require-in-the-middle` which: - overrides the global `Module.prototype.require`, even when bundled - reads `require.cache` which when bundled is Turbopack's registry (not the outer Node.js one) Because of this, `require-in-the-middle` is broken/results in a broken environment when it's bundled (e.g. via `instrumentation.js`).
1 parent c9c94c5 commit 37ea26b

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed
 

‎docs/02-app/02-api-reference/05-next-config-js/serverExternalPackages.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Next.js includes a [short list of popular packages](https://github.com/vercel/ne
6969
- `prisma`
7070
- `puppeteer-core`
7171
- `puppeteer`
72+
- `require-in-the-middle`
7273
- `rimraf`
7374
- `sharp`
7475
- `shiki`

‎docs/03-pages/02-api-reference/04-next-config-js/serverExternalPackages.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Next.js includes a [short list of popular packages](https://github.com/vercel/ne
6969
- `prisma`
7070
- `puppeteer-core`
7171
- `puppeteer`
72+
- `require-in-the-middle`
7273
- `rimraf`
7374
- `sharp`
7475
- `shiki`

‎packages/next/src/lib/server-external-packages.json

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"prisma",
5151
"puppeteer",
5252
"puppeteer-core",
53+
"require-in-the-middle",
5354
"rimraf",
5455
"sharp",
5556
"shiki",

0 commit comments

Comments
 (0)
Please sign in to comment.