Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
fix: disable pwa due to caching errors (#9781)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude authored Nov 12, 2023
1 parent 8a32fb2 commit f23dc7c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 36 deletions.
2 changes: 1 addition & 1 deletion components/PageHead.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function PageHead(props) {
<meta property="og:type" content={ogType} />
<meta property="og:url" content={ogUrl} />
<meta property="og:image" content={ogImage} />
<link rel="manifest" href="/manifest.json" />
{/* <link rel="manifest" href="/manifest.json" /> */}

{children}
</Head>
Expand Down
72 changes: 37 additions & 35 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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,
},
// ),
);

0 comments on commit f23dc7c

Please sign in to comment.