diff --git a/packages/next/src/withPayload.js b/packages/next/src/withPayload.js index 8fa8b23c8c..9d86756ca9 100644 --- a/packages/next/src/withPayload.js +++ b/packages/next/src/withPayload.js @@ -102,7 +102,7 @@ export const withPayload = (nextConfig = {}, options = {}) => { 'pino-pretty', 'graphql', // Do not bundle server-only packages during dev to improve compile speed - ...(process.env.npm_lifecycle_event === 'dev' && options.devBundleServerPackages === false + ...(process.env.NODE_ENV === 'development' && options.devBundleServerPackages === false ? [ 'payload', '@payloadcms/db-mongodb', @@ -114,11 +114,11 @@ export const withPayload = (nextConfig = {}, options = {}) => { '@payloadcms/email-resend', '@payloadcms/graphql', '@payloadcms/payload-cloud', - '@payloadcms/plugin-cloud-storage', '@payloadcms/plugin-redirects', - '@payloadcms/plugin-sentry', - '@payloadcms/plugin-stripe', // TODO: Add the following packages, excluding their /client subpath exports, once Next.js supports it + //'@payloadcms/plugin-cloud-storage', + //'@payloadcms/plugin-sentry', + //'@payloadcms/plugin-stripe', // @payloadcms/richtext-lexical //'@payloadcms/storage-azure', //'@payloadcms/storage-gcs',