diff --git a/next.config.ts b/next.config.ts index c624be0..c38f42b 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,27 +1,18 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - output: "export", - reactStrictMode: false, + output: "export", // Static HTML export — served via nginx/CDN + reactStrictMode: true, // Enables strict mode to catch bugs early trailingSlash: true, images: { - unoptimized: true, // ⬅ required for static export to work with next/image - domains: ['your-cdn.com', 'images.unsplash.com'], // allow external domains + unoptimized: true, // Required for static export (no Next.js image server) }, - async headers() { - return [ - { - source: '/(.*)', - headers: [ - { - key: 'Cache-Control', - value: 'no-store, no-cache, must-revalidate, proxy-revalidate', - }, - ], - }, - ]; - }, + // NOTE: async headers() is NOT supported with output:"export" + // Cache-Control headers must be set at the web server level (nginx/Apache/CDN). + // Recommended nginx config for production: + // location ~* \.(html)$ { add_header Cache-Control "public, max-age=0, must-revalidate"; } + // location ~* \.(js|css|woff2|webp|png|jpg|svg)$ { add_header Cache-Control "public, max-age=31536000, immutable"; } }; module.exports = nextConfig; diff --git a/package-lock.json b/package-lock.json index 970c2b6..286465c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1163,7 +1163,6 @@ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", "license": "MIT", - "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" @@ -1261,7 +1260,6 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz", "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==", "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -1349,7 +1347,6 @@ "integrity": "sha512-IgSWvLobTDOjnaxAfDTIHaECbkNlAlKv2j5SjpB2v7QHKv1FIfjwMy8FsDbVfDX/KjmCmYICcw7uGaXLhtsLNg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.56.0", "@typescript-eslint/types": "8.56.0", @@ -1875,7 +1872,6 @@ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2850,7 +2846,6 @@ "integrity": "sha512-VmQ+sifHUbI/IcSopBCF/HO3YiHQx/AVd3UVyYL6weuwW+HvON9VYn5l6Zl1WZzPWXPNZrSQpxwkkZ/VuvJZzg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -3024,7 +3019,6 @@ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -5044,7 +5038,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -5079,7 +5072,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -5348,7 +5340,6 @@ "resolved": "https://registry.npmjs.org/sass/-/sass-1.97.3.tgz", "integrity": "sha512-fDz1zJpd5GycprAbu4Q2PV/RprsRtKC/0z82z0JLgdytmcq0+ujJbJ/09bPGDxCLkKY3Np5cRAOcWiVkLXJURg==", "license": "MIT", - "peer": true, "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", @@ -5953,7 +5944,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -6125,7 +6115,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/public/Lighthouse-Optimization-Complete.md b/public/Lighthouse-Optimization-Complete.md new file mode 100644 index 0000000..8f3397a --- /dev/null +++ b/public/Lighthouse-Optimization-Complete.md @@ -0,0 +1,139 @@ +# Metatroncube Lighthouse & SEO Optimization — Full Change Log + +**Completed:** April 2026 +**Target:** 100/100 on all Lighthouse categories (Performance, Accessibility, Best Practices, SEO) +**Starting scores:** Performance 75 | Accessibility 88 | Best Practices 77 | SEO 100 + +--- + +## ✅ Performance Fixes + +### CSS Render-Blocking Eliminated +- **bootstrap.min.css, main.css, spacing.css** → kept as critical (required for initial paint) +- **fontawesome-pro.css, animate.css, swiper.min.css, slick.css, magnific-popup.css, meanmenu.min.css** → deferred using `media="print" onLoad="this.media='all'"` pattern (~820ms savings) +- **Google Fonts (Inter)** → moved from `@import` in `main.css` to async `` in layout.tsx with preconnect hints +- Added `