diff --git a/core/next.config.ts b/core/next.config.ts index 5a6fe39ef..a3dd2f107 100644 --- a/core/next.config.ts +++ b/core/next.config.ts @@ -36,24 +36,6 @@ export default async (): Promise => { ignoreDuringBuilds: !!process.env.CI, dirs: ['app', 'client', 'components', 'lib', 'middlewares'], }, - webpack: (config, { isServer }) => { - // Limit the number of chunks to reduce CDN requests, which contribute to Edge Request costs - // Making this number higher may improve performance, but making it lower will reduce total requests and costs - // Simply set the WEBPACK_MAX_CHUNKS environment variable to the desired number of chunks - if (!isServer) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call - config.plugins.push( - new optimize.LimitChunkCountPlugin({ - maxChunks: process.env.WEBPACK_MAX_CHUNKS - ? parseInt(process.env.WEBPACK_MAX_CHUNKS, 10) - : 50, - }), - ); - } - - // eslint-disable-next-line @typescript-eslint/no-unsafe-return - return config; - }, // default URL generation in BigCommerce uses trailing slash trailingSlash: process.env.TRAILING_SLASH !== 'false', // eslint-disable-next-line @typescript-eslint/require-await