Skip to content

Commit 10abf59

Browse files
committed
Performance Optimizations
1 parent 21cf0c5 commit 10abf59

3 files changed

Lines changed: 25 additions & 4 deletions

File tree

frontend/app/layout.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,18 @@ import { Inter, JetBrains_Mono } from "next/font/google";
33
import { Analytics } from "@vercel/analytics/next";
44
import "./globals.css";
55

6-
const inter = Inter({ subsets: ["latin"], variable: "--font-inter" });
7-
const jetbrainsMono = JetBrains_Mono({ subsets: ["latin"], variable: "--font-jetbrains" });
6+
const inter = Inter({
7+
subsets: ["latin"],
8+
variable: "--font-inter",
9+
display: 'swap',
10+
preload: true,
11+
});
12+
const jetbrainsMono = JetBrains_Mono({
13+
subsets: ["latin"],
14+
variable: "--font-jetbrains",
15+
display: 'swap',
16+
preload: true,
17+
});
818

919
export const metadata: Metadata = {
1020
title: "Project Cerberus | The AI Iron Dome",

frontend/next.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ const nextConfig: NextConfig = {
3838
}
3939
]
4040
},
41+
experimental: {
42+
optimizePackageImports: ['lucide-react', 'framer-motion'],
43+
},
44+
compiler: {
45+
removeConsole: process.env.NODE_ENV === 'production' ? {
46+
exclude: ['error', 'warn'],
47+
} : false,
48+
},
4149
};
4250

4351
export default nextConfig;

frontend/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@
3333
"typescript": "^5"
3434
},
3535
"browserslist": [
36-
"defaults",
37-
"not ie 11",
36+
"chrome >= 90",
37+
"edge >= 90",
38+
"firefox >= 88",
39+
"safari >= 14",
40+
"not dead",
3841
"not op_mini all"
3942
]
4043
}

0 commit comments

Comments
 (0)