feat: rollback next.config
This commit is contained in:
parent
9dbc02dd0f
commit
e46cc9141d
|
|
@ -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'],
|
||||
|
|
|
|||
Loading…
Reference in New Issue