fix(web): enable turbopack + payload by unbundling richtext-lexical
Some checks failed
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled

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) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-08 09:38:56 +01:00
parent 42c1d02f5e
commit 495c234159
2 changed files with 1 additions and 2 deletions

View File

@@ -87,7 +87,6 @@ const config: NextConfig = {
"payload",
"@payloadcms/db-postgres",
"@payloadcms/db-sqlite",
"@payloadcms/richtext-lexical",
"sharp",
],
turbopack: {

View File

@@ -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",