Skip to content

Commit

Permalink
chore: next.config.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
rmonnier9 committed Nov 8, 2024
1 parent 95b7ebe commit b2120b7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions next.config.js → next.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @ts-check
const { withSentryConfig } = require('@sentry/nextjs');
const redirects = require('./redirects.json');
import { withSentryConfig } from '@sentry/nextjs';
import { NextConfig } from 'next';
import redirects from './redirects.json';

const nextBuildId = require('next-build-id');

const WITH_SENTRY =
Expand All @@ -19,7 +20,7 @@ WARNING: Building without uploading sourcemap to Sentry
`);
}
const nextjsConfig = {
const nextConfig: NextConfig = {
webpack: (config, { isServer }) => {
config.module.rules.push({
test: /\.ya?ml$/,
Expand All @@ -43,6 +44,7 @@ const nextjsConfig = {
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'X-Debug-Deployment',
Expand All @@ -56,8 +58,8 @@ const nextjsConfig = {
},
};

module.exports = WITH_SENTRY
? withSentryConfig(nextjsConfig, {
export default WITH_SENTRY
? withSentryConfig(nextConfig, {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
org: process.env.SENTRY_ORG,
Expand Down Expand Up @@ -103,4 +105,4 @@ module.exports = WITH_SENTRY
disable: DISABLE_SOURCEMAP_UPLOAD,
},
})
: nextjsConfig;
: nextConfig;

0 comments on commit b2120b7

Please sign in to comment.