diff --git a/apps/readest-app/next.config.mjs b/apps/readest-app/next.config.mjs index c995aa3e..12856f2f 100644 --- a/apps/readest-app/next.config.mjs +++ b/apps/readest-app/next.config.mjs @@ -50,6 +50,15 @@ const nextConfig = { }, ], }, + { + source: '/_next/static/:path*', + headers: [ + { + key: 'Cache-Control', + value: 'public, max-age=31536000, immutable', + }, + ], + }, ]; }, }; @@ -57,6 +66,7 @@ const nextConfig = { const withPWA = withPWAInit({ dest: 'public', disable: isDev || appPlatform !== 'web', + buildExcludes: [/\/_headers$/], cacheOnFrontEndNav: true, aggressiveFrontEndNavCaching: true, reloadOnOnline: true, diff --git a/apps/readest-app/public/_headers b/apps/readest-app/public/_headers deleted file mode 100644 index e6320ab1..00000000 --- a/apps/readest-app/public/_headers +++ /dev/null @@ -1,2 +0,0 @@ -/_next/static/* - Cache-Control: public,max-age=31536000,immutable \ No newline at end of file