From 495c2341594c8af0a4a9e91de41cca8ed8a2324d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= <35082514+alezmad@users.noreply.github.com> Date: Wed, 8 Apr 2026 09:38:56 +0100 Subject: [PATCH] fix(web): enable turbopack + payload by unbundling richtext-lexical MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CSS import error was caused by richtext-lexical being in serverExternalPackages — Node can't require .css files. Removing it lets Turbopack bundle it (handling CSS natively). Other payload packages stay external (they don't import CSS). Restores turbopack as the default production bundler. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/web/next.config.ts | 1 - apps/web/package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index 6dc3727..4d69822 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -87,7 +87,6 @@ const config: NextConfig = { "payload", "@payloadcms/db-postgres", "@payloadcms/db-sqlite", - "@payloadcms/richtext-lexical", "sharp", ], turbopack: { diff --git a/apps/web/package.json b/apps/web/package.json index 3745442..9d0a1b9 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -4,7 +4,7 @@ "private": true, "type": "module", "scripts": { - "build": "TURBOPACK=0 next build", + "build": "next build", "clean": "git clean -xdf .cache .next .turbo node_modules", "dev": "next dev", "format": "prettier --check . --ignore-path ../../.gitignore",