Skip to content

Commit

Permalink
change sourcemap to hidden and create error to test sourcemaps were u…
Browse files Browse the repository at this point in the history
…ploaded to DD
  • Loading branch information
heatlikeheatwave committed Jul 29, 2024
1 parent 25a6174 commit d5eede9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion src/views/homepage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

// Third-party imports
import { ReactElement } from 'react'
import { ReactElement, useEffect } from 'react'

// Global imports
import BaseLayout from 'layouts/base-layout'
Expand All @@ -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 (
<BaseLayout mobileMenuSlot={<MobileMenuLevelsGeneric />}>
<div className={s.root}>
Expand Down

0 comments on commit d5eede9

Please sign in to comment.