From aaab7feea6dfc356d69efff8df123b4bba8e9738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= <35082514+alezmad@users.noreply.github.com> Date: Mon, 6 Apr 2026 09:48:36 +0100 Subject: [PATCH] fix(web): restore turbopack SVG loader (fixes React #130) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The turbopack.rules config for @svgr/webpack was removed during the Payload integration attempts. Without it, SVG imports return raw module objects instead of React components. This crashes LocaleCustomizer → Icons.UnitedKingdom → object → React #130. Next.js 16.2.2 supports turbopack in production builds, so this config is safe now. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/web/next.config.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index 63e05c2..e02b8b2 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -87,6 +87,15 @@ const config: NextConfig = { "@payloadcms/richtext-lexical", "sharp", ], + turbopack: { + rules: { + "*.svg": { + loaders: ["@svgr/webpack"], + as: "*.js", + }, + }, + }, + images: { remotePatterns: [ {