From eaeb1311e533f0c6b7c2526f829c55ebece6602c Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Wed, 2 Nov 2022 21:04:40 +0100 Subject: [PATCH] Add `prisma` to the external package list (#42323) It uses __dirname in eval and similar things, and can't be bundled correctly. Hence we are adding it to the list of external packages. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) Co-authored-by: JJ Kasper --- packages/next/lib/server-external-packages.ts | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/packages/next/lib/server-external-packages.ts b/packages/next/lib/server-external-packages.ts index 15fd0f2d1cf6354..a4afe15f8893722 100644 --- a/packages/next/lib/server-external-packages.ts +++ b/packages/next/lib/server-external-packages.ts @@ -1,22 +1,23 @@ // A list of popular packages that cannot be bundled on the server. export const EXTERNAL_PACKAGES = [ - 'eslint', - 'typescript', - 'prettier', - 'postcss', - 'jest', - 'autoprefixer', - 'tailwindcss', - 'sharp', - 'express', - 'ts-node', - 'webpack', - 'cypress', '@sentry/nextjs', '@sentry/node', + 'autoprefixer', + 'cypress', + 'eslint', + 'express', + 'jest', + 'mongodb', + 'next-mdx-remote', 'next-seo', + 'postcss', + 'prettier', + 'prisma', 'rimraf', - 'next-mdx-remote', + 'sharp', 'sqlite3', - 'mongodb', + 'tailwindcss', + 'ts-node', + 'typescript', + 'webpack', ]