Fix build error: create custom next-pwa declaration file to resolve TypeScript conflicts with Next.js 16

This commit is contained in:
nmemmert committed 2025-10-23 08:26:53 -04:00
1 parent 6a997d9931
commit 39d621a0be
2 files changed
+23 -1

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
declare module 'next-pwa' {
import { NextConfig } from 'next';
interface PWAConfig {
dest?: string;
disable?: boolean;
register?: boolean;
scope?: string;
sw?: string;
runtimeCaching?: any[];
buildExcludes?: string[];
publicExcludes?: string[];
fallbacks?: Record<string, string>;
cacheOnFrontEndNav?: boolean;
reloadOnOnline?: boolean;
[key: string]: any;
}
function withPWA(config?: PWAConfig): (nextConfig: NextConfig) => NextConfig;
export = withPWA;
}