From 8aa06e42912f24c5c9735a5040f9af42e08bc961 Mon Sep 17 00:00:00 2001 From: DuCanhGH <75556609+DuCanhGH@users.noreply.github.com> Date: Thu, 22 Jun 2023 18:14:23 +0700 Subject: [PATCH] docs: cleaned up next-pwa/getting-started --- docs/content/next-pwa/getting-started.mdx | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/docs/content/next-pwa/getting-started.mdx b/docs/content/next-pwa/getting-started.mdx index a96d250a..c602e8e9 100644 --- a/docs/content/next-pwa/getting-started.mdx +++ b/docs/content/next-pwa/getting-started.mdx @@ -66,18 +66,10 @@ const nextConfig = { reactStrictMode: true, }; -/** - * @type {( - * phase: string, - * { defaultConfig }: { defaultConfig: NextConfig }, - * ) => NextConfig} - */ module.exports = (phase) => { if (phase === PHASE_DEVELOPMENT_SERVER || phase === PHASE_PRODUCTION_BUILD) { const withPWA = require("@ducanh2912/next-pwa").default({ dest: "public", - cacheOnFrontEndNav: true, - aggressiveFrontEndNavCaching: true, }); return withPWA(nextConfig); } @@ -98,25 +90,17 @@ const nextConfig = { reactStrictMode: true, }; -/** - * @type {( - * phase: string, - * { defaultConfig }: { defaultConfig: NextConfig }, - * ) => NextConfig} - */ -const nextPluginsCompose = async (phase) => { +const nextConfigFunction = async (phase) => { if (phase === PHASE_DEVELOPMENT_SERVER || phase === PHASE_PRODUCTION_BUILD) { const withPWA = (await import("@ducanh2912/next-pwa")).default({ dest: "public", - cacheOnFrontEndNav: true, - aggressiveFrontEndNavCaching: true, }); return withPWA(nextConfig); } return nextConfig; }; -export default nextPluginsCompose; +export default nextConfigFunction; ```