feat: optimize icon imports for smaller page downloads by enabling tree-shaking in the build process

This commit is contained in:
Usman Baig
2026-02-22 21:04:05 +01:00
parent 39eac4100e
commit 19be64c43a
2 changed files with 4 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
- **Faster favicon loading.** Site icons in the dashboard, referrers, and campaigns now use Next.js image optimization for better caching and lazy loading.
- **Tighter name limits.** Site, funnel, and monitor names are now capped at 100 characters instead of 255 — long enough for any real name, short enough to not break the UI.
- **Stricter type safety.** Eliminated all `any` types and `@ts-ignore` suppressions across the codebase, so the TypeScript compiler catches more bugs at build time.
- **Smaller page downloads.** Icon imports are now tree-shaken so only the icons actually used are included in the bundle.
### Fixed

View File

@@ -12,6 +12,9 @@ const nextConfig: NextConfig = {
output: 'standalone',
// * Privacy-first: Disable analytics and telemetry
productionBrowserSourceMaps: false,
experimental: {
optimizePackageImports: ['react-icons'],
},
images: {
remotePatterns: [
{