Fix Next.js 15 compatibility and TypeScript errors
- Update API route handlers to use async params for Next.js 15 compatibility - Fix MUI DataGrid deprecated props (pageSize -> initialState.pagination) - Replace Material-UI Grid components with Box for better compatibility - Fix admin authentication system with proper request parameters - Update permission constants to match available AdminPermission enum values - Add missing properties to Page interface for type safety - Update .gitignore to exclude venv/, import logs, and large data directories - Optimize Next.js config to reduce memory usage during builds 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,8 +9,8 @@ const nextConfig = {
|
||||
|
||||
// Build optimizations
|
||||
experimental: {
|
||||
// Reduce memory usage during builds
|
||||
webpackBuildWorker: true,
|
||||
// Disable webpack build worker to prevent memory issues
|
||||
webpackBuildWorker: false,
|
||||
},
|
||||
|
||||
// Webpack optimizations
|
||||
@@ -40,12 +40,23 @@ const nextConfig = {
|
||||
]
|
||||
}
|
||||
|
||||
// Add ignore patterns for webpack
|
||||
// Add ignore patterns for webpack - exclude entire directories
|
||||
config.module.rules.push({
|
||||
test: /bibles\/.*\.(json|txt|md)$/,
|
||||
test: /[\\/](bibles|scripts)[\\/]/,
|
||||
use: 'ignore-loader'
|
||||
})
|
||||
|
||||
// Also exclude these paths from resolve
|
||||
config.resolve = {
|
||||
...config.resolve,
|
||||
alias: {
|
||||
...config.resolve?.alias,
|
||||
// Prevent webpack from trying to resolve these directories
|
||||
'@/bibles': false,
|
||||
'@/scripts': false
|
||||
}
|
||||
}
|
||||
|
||||
// Reduce bundle analysis overhead
|
||||
config.stats = 'errors-warnings'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user