fix: exclude plugin-cloud-storage, plugin-sentry and plugin-stripe from bundling optimization (#11673)
Since those packages have `/client` exports, we cannot exclude them from the bundler until https://github.com/vercel/next.js/discussions/76991 is implemented. Fixes https://github.com/payloadcms/payload/pull/11594#issuecomment-2717309220
This commit is contained in:
@@ -102,7 +102,7 @@ export const withPayload = (nextConfig = {}, options = {}) => {
|
|||||||
'pino-pretty',
|
'pino-pretty',
|
||||||
'graphql',
|
'graphql',
|
||||||
// Do not bundle server-only packages during dev to improve compile speed
|
// 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',
|
'payload',
|
||||||
'@payloadcms/db-mongodb',
|
'@payloadcms/db-mongodb',
|
||||||
@@ -114,11 +114,11 @@ export const withPayload = (nextConfig = {}, options = {}) => {
|
|||||||
'@payloadcms/email-resend',
|
'@payloadcms/email-resend',
|
||||||
'@payloadcms/graphql',
|
'@payloadcms/graphql',
|
||||||
'@payloadcms/payload-cloud',
|
'@payloadcms/payload-cloud',
|
||||||
'@payloadcms/plugin-cloud-storage',
|
|
||||||
'@payloadcms/plugin-redirects',
|
'@payloadcms/plugin-redirects',
|
||||||
'@payloadcms/plugin-sentry',
|
|
||||||
'@payloadcms/plugin-stripe',
|
|
||||||
// TODO: Add the following packages, excluding their /client subpath exports, once Next.js supports it
|
// 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/richtext-lexical
|
||||||
//'@payloadcms/storage-azure',
|
//'@payloadcms/storage-azure',
|
||||||
//'@payloadcms/storage-gcs',
|
//'@payloadcms/storage-gcs',
|
||||||
|
|||||||
Reference in New Issue
Block a user