From 072cfa3f1e20958981d4f2ccbb6285fae68878e3 Mon Sep 17 00:00:00 2001 From: Bram Suurd Date: Sat, 3 Aug 2024 15:03:50 +0200 Subject: [PATCH] chore: Update analytics script URL and remove unused imports --- app/layout.tsx | 2 +- next.config.js | 18 ------------------ next.config.mjs | 28 +++++++++++++++++++++++++++- 3 files changed, 28 insertions(+), 20 deletions(-) delete mode 100644 next.config.js diff --git a/app/layout.tsx b/app/layout.tsx index e699419..e20d949 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -59,7 +59,7 @@ export default function RootLayout({ diff --git a/next.config.js b/next.config.js deleted file mode 100644 index 6d50136..0000000 --- a/next.config.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - webpack: (config) => { - config.resolve.alias.canvas = false; - - return config; - }, - images: { - remotePatterns: [ - { - protocol: "https", - hostname: "**", - }, - ], - }, - experimental: { - missingSuspenseWithCSRBailout: false, - }, -}; diff --git a/next.config.mjs b/next.config.mjs index 4678774..959d71a 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,4 +1,30 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + webpack: (config) => { + config.resolve.alias.canvas = false; + + return config; + }, + images: { + remotePatterns: [ + { + protocol: "https", + hostname: "**", + }, + ], + }, + experimental: { + missingSuspenseWithCSRBailout: false, + }, + + async rewrites() { + return [ + { + source: "/analytics/:path*", + destination: `${process.env.NEXT_PUBLIC_ANALYTICS_URL}/:path*`, + }, + ]; + }, +}; export default nextConfig;