From d5eede95f36b87449db4f07ccf0faa239e7a924f Mon Sep 17 00:00:00 2001 From: Heat Hamilton Date: Mon, 29 Jul 2024 19:22:44 -0400 Subject: [PATCH] change sourcemap to hidden and create error to test sourcemaps were uploaded to DD --- next.config.js | 2 +- src/views/homepage/index.tsx | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/next.config.js b/next.config.js index 83a7362487..00e682c216 100644 --- a/next.config.js +++ b/next.config.js @@ -56,7 +56,7 @@ module.exports = withHashicorp({ config.plugins.push(HashiConfigPlugin()) if (process.env.VERCEL_ENV && process.env.VERCEL_ENV !== 'development') { - config.devtool = 'source-map' + config.devtool = 'hidden-source-map' } return config diff --git a/src/views/homepage/index.tsx b/src/views/homepage/index.tsx index d7b1cb4552..66941d92b0 100644 --- a/src/views/homepage/index.tsx +++ b/src/views/homepage/index.tsx @@ -4,7 +4,7 @@ */ // Third-party imports -import { ReactElement } from 'react' +import { ReactElement, useEffect } from 'react' // Global imports import BaseLayout from 'layouts/base-layout' @@ -20,6 +20,13 @@ import { import s from './homepage.module.css' function HomePageView(): ReactElement { + useEffect(() => { + const timer = setTimeout(() => { + throw new Error('This is a new test error thrown after 5 seconds') + }, 5000) + + return () => clearTimeout(timer) // Cleanup the timer on component unmount + }, []) return ( }>