-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnext.config.ts
More file actions
55 lines (45 loc) · 1.71 KB
/
next.config.ts
File metadata and controls
55 lines (45 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Enable React strict mode for improved error handling
reactStrictMode: true,
async redirects() {
return [
{ source: '/assets/fixed-asset', destination: '/operations/fixed-asset', permanent: true },
{ source: '/assets/warehouse', destination: '/operations/warehouse', permanent: true },
{ source: '/assets/it-purchasing', destination: '/operations/it-purchasing', permanent: true },
{ source: '/assets/internet', destination: '/network/internet', permanent: true },
{ source: '/assets/wifi', destination: '/network/wifi', permanent: true },
{ source: '/users', destination: '/iam/users', permanent: true },
{ source: '/tenants', destination: '/iam/tenants', permanent: true },
{ source: '/roles', destination: '/iam/roles', permanent: true },
];
},
// Enable compression to reduce bundle sizes
compress: true,
// Optimize images
images: {
minimumCacheTTL: 60,
},
// Production security settings
productionBrowserSourceMaps: false, // Disable source maps in production
// Enable experimental features for better performance
experimental: {
// Optimize CSS processing
optimizeCss: true,
// Enable faster page loading
optimizePackageImports: [
'lucide-react',
'@tanstack/react-query',
'next-themes',
'sonner',
'@dnd-kit/core',
'@dnd-kit/sortable',
'@dnd-kit/utilities'
],
},
// Move serverComponentsExternalPackages to the root level
serverExternalPackages: [],
// Use Webpack instead of Turbopack to avoid the build error
// Remove the Turbopack-specific configuration
};
export default nextConfig;