From f23dc7cd68a6c2b93282980edbf5da5970654860 Mon Sep 17 00:00:00 2001 From: Eddie Jaoude Date: Sun, 12 Nov 2023 22:44:06 +0000 Subject: [PATCH] fix: disable pwa due to caching errors (#9781) --- components/PageHead.js | 2 +- next.config.mjs | 72 ++++++++++++++++++++++-------------------- 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/components/PageHead.js b/components/PageHead.js index 96db6338a33..490ad4fe321 100644 --- a/components/PageHead.js +++ b/components/PageHead.js @@ -24,7 +24,7 @@ export default function PageHead(props) { - + {/* */} {children} diff --git a/next.config.mjs b/next.config.mjs index 97fa9f3e22b..16a74be9c14 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -2,10 +2,10 @@ import { withSentryConfig } from "@sentry/nextjs"; import remarkGfm from "remark-gfm"; import remarkPrism from "remark-prism"; import createMDX from "@next/mdx"; -import withPWA from "next-pwa"; -import runtimeCaching from "next-pwa/cache.js"; +// import withPWA from "next-pwa"; +// import runtimeCaching from "next-pwa/cache.js"; -const isProduction = process.env.NODE_ENV === "production"; +// const isProduction = process.env.NODE_ENV === "production"; /** @type {import('next').NextConfig} */ const nextConfig = { @@ -53,43 +53,45 @@ const withMDX = createMDX({ }, }); -export default withPWA({ - dest: "public", - disable: !isProduction, - runtimeCaching, -})(withSentryConfig( +export default // withPWA({ +// disable: true, +// dest: "public", +// disable: !isProduction, +// runtimeCaching, +// }) +// ( +withSentryConfig( + withMDX(nextConfig), + { + // For all available options, see: + // https://github.com/getsentry/sentry-webpack-plugin#options - withMDX(nextConfig), - { - // For all available options, see: - // https://github.com/getsentry/sentry-webpack-plugin#options - - // Suppresses source map uploading logs during build - silent: true, - org: process.env.SENTRY_ORG, - project: process.env.SENTRY_PROJECT, - }, - { - // For all available options, see: - // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ + // Suppresses source map uploading logs during build + silent: true, + org: process.env.SENTRY_ORG, + project: process.env.SENTRY_PROJECT, + }, + { + // For all available options, see: + // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ - // Upload a larger set of source maps for prettier stack traces (increases build time) - widenClientFileUpload: true, + // Upload a larger set of source maps for prettier stack traces (increases build time) + widenClientFileUpload: true, - // Transpiles SDK to be compatible with IE11 (increases bundle size) - transpileClientSDK: true, + // Transpiles SDK to be compatible with IE11 (increases bundle size) + transpileClientSDK: true, - // Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load) - tunnelRoute: "/monitoring", + // Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load) + tunnelRoute: "/monitoring", - // Hides source maps from generated client bundles - hideSourceMaps: true, + // Hides source maps from generated client bundles + hideSourceMaps: true, - // Automatically tree-shake Sentry logger statements to reduce bundle size - disableLogger: true, + // Automatically tree-shake Sentry logger statements to reduce bundle size + disableLogger: true, - // custom - automaticVercelMonitors: false, - }, - ), + // custom + automaticVercelMonitors: false, + }, + // ), );