fix(web): externalize payload + esbuild from turbopack bundle
Turbopack tries to parse esbuild's native binary as JS, causing build failure. Externalize all Payload-related packages so they resolve at runtime, not bundled. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -80,6 +80,12 @@ const config: NextConfig = {
|
|||||||
serverExternalPackages: [
|
serverExternalPackages: [
|
||||||
"better-sqlite3",
|
"better-sqlite3",
|
||||||
"@mapbox/node-pre-gyp",
|
"@mapbox/node-pre-gyp",
|
||||||
|
"esbuild",
|
||||||
|
"payload",
|
||||||
|
"@payloadcms/db-postgres",
|
||||||
|
"@payloadcms/db-sqlite",
|
||||||
|
"@payloadcms/richtext-lexical",
|
||||||
|
"sharp",
|
||||||
],
|
],
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
|
|||||||
Reference in New Issue
Block a user