From e46cc9141d1a128b5919b45af5986f8314e03582 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Thu, 3 Jul 2025 22:45:34 +0700 Subject: [PATCH] feat: rollback next.config --- next.config.ts | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/next.config.ts b/next.config.ts index b2329f5..1763619 100644 --- a/next.config.ts +++ b/next.config.ts @@ -10,49 +10,6 @@ const nextConfig: NextConfig = { eslint: { ignoreDuringBuilds: true, }, - webpack: (config, { isServer }) => { - // Handle chunk loading errors - config.optimization = { - ...config.optimization, - splitChunks: { - ...config.optimization.splitChunks, - chunks: 'all', - cacheGroups: { - ...config.optimization.splitChunks?.cacheGroups, - vendor: { - test: /[\\/]node_modules[\\/]/, - name: 'vendors', - chunks: 'all', - }, - // Separate CKEditor chunks - ckeditor: { - test: /[\\/]node_modules[\\/]@ckeditor[\\/]/, - name: 'ckeditor', - chunks: 'all', - priority: 20, - }, - // Separate ApexCharts chunks - apexcharts: { - test: /[\\/]node_modules[\\/](apexcharts|react-apexcharts)[\\/]/, - name: 'apexcharts', - chunks: 'all', - priority: 20, - }, - }, - }, - }; - - // Add error handling for chunk loading - if (!isServer) { - config.output = { - ...config.output, - chunkFilename: '[name].[chunkhash].js', - filename: '[name].[chunkhash].js', - }; - } - - return config; - }, // Add experimental features for better chunk handling experimental: { optimizePackageImports: ['@ckeditor/ckeditor5-react', 'react-apexcharts'],