Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import './.next/types/routes.d.ts';

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
70 changes: 17 additions & 53 deletions next.config.js → next.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
// @ts-check
import type { NextConfig } from 'next';
import { withSentryConfig } from '@sentry/nextjs';
import bundleAnalyzer from '@next/bundle-analyzer';
import { svgoConfig } from './src/common/config/svgo';

const hasBundleAnalyzer = process.env.ANALYZE === 'true';
const { withSentryConfig } = require('@sentry/nextjs');
const withBundleAnalyzer = require('@next/bundle-analyzer')({ enabled: hasBundleAnalyzer });
const svgoConfig = require('./src/common/config/svgo');
const withBundleAnalyzer = bundleAnalyzer({ enabled: hasBundleAnalyzer });
const jsonSvgoConfig = JSON.parse(JSON.stringify(svgoConfig));

/**
* @see https://nextjs.org/docs/basic-features/typescript#type-checking-nextconfigjs
* @type {import('next').NextConfig}
*/
const nextConfig = {
const nextConfig: NextConfig = {
turbopack: {
rules: {
'*.svg': {
loaders: ['@svgr/webpack'],
loaders: [
{
loader: '@svgr/webpack',
options: {
svgo: jsonSvgoConfig,
},
},
],
as: '*.js',
},
},
Expand All @@ -30,7 +36,6 @@ const nextConfig = {
],
},

/** @see https://nextjs.org/docs/api-reference/next.config.js/rewrites */
async rewrites() {
return [
{
Expand All @@ -44,7 +49,6 @@ const nextConfig = {
];
},

/** @see https://nextjs.org/docs/api-reference/next.config.js/redirects */
async redirects() {
return [
{
Expand All @@ -69,48 +73,8 @@ const nextConfig = {
},
];
},

/** @see https://nextjs.org/docs/api-reference/next.config.js/headers */
async headers() {
return [
{
source: '/_next/static/([^/]+/pages|chunks|runtime|css|fonts)/(.+)',
headers: [
{
key: 'cache-control',
value: 'max-age=31536000',
},
],
},
{
source: '/(favicon.ico|robots.txt|manifest.json|humans.txt|sitemap.xml|sitemap.xsl)',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=0, must-revalidate',
},
],
},
];
},

webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
use: [
{
loader: '@svgr/webpack',
options: {
svgoConfig,
},
},
],
});

return config;
},
};

module.exports = withSentryConfig(withBundleAnalyzer(nextConfig), {
export default withSentryConfig(withBundleAnalyzer(nextConfig), {
silent: true,
});
14 changes: 0 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,12 @@
"fingerprintjs2": "^2.1.4",
"fontfaceobserver": "^2.3.0",
"formik": "^2.4.6",
"intersection-observer": "^0.12.2",
"lodash": "^4.17.21",
"logrocket": "^10.1.0",
"logrocket-react": "^6.0.3",
"next": "^16.2.1",
"next-sitemap": "^4.2.3",
"object-hash": "^3.0.0",
"path": "^0.12.7",
"prop-types": "^15.8.1",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-player": "^2.16.0",
Expand All @@ -79,7 +76,6 @@
"@types/logrocket-react": "^3.0.3",
"@types/node": "^24.9.1",
"@types/object-hash": "^3.0.0",
"@types/prop-types": "^15.7.15",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^4.4.1",
Expand All @@ -89,7 +85,6 @@
"axios-mock-adapter": "^2.1.0",
"chromatic": "^15.3.0",
"cross-env": "^7.0.3",
"css-loader": "^6.7.1",
"dotenv": "^17.2.3",
"eslint": "^9.39.4",
"eslint-config-prettier": "^10.1.8",
Expand All @@ -105,25 +100,16 @@
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-storybook": "^10.3.2",
"eslint-plugin-unicorn": "^63.0.0",
"express": "^4.18.1",
"file-loader": "^6.2.0",
"husky": "^9.1.7",
"identity-obj-proxy": "^3.0.0",
"jsdom": "^26.1.0",
"lint-staged": "13.0.3",
"postcss": "^8.5.6",
"prettier": "^3.8.1",
"prettier-plugin-tailwindcss": "^0.7.2",
"process": "0.11.10",
"react-is": "^19.2.4",
"require-context.macro": "^1.2.2",
"start-server-and-test": "^1.14.0",
"storybook": "^10.3.1",
"style-loader": "^3.3.1",
"tailwindcss": "^4.2.2",
"typescript": "^5.9.3",
"typescript-eslint": "^8.57.1",
"url-loader": "^4.1.1",
"vite-plugin-magical-svg": "^1.9.0",
"vite-tsconfig-paths": "^6.1.1",
"vitest": "^3.1.2",
Expand Down
Loading
Loading