Skip to content

fix: avoid Turbopack PostCSS loader race - #2265

Merged
richiemcilroy merged 1 commit into
mainfrom
fix/web-postcss-cold-build
Sep 9, 2026
Merged

fix: avoid Turbopack PostCSS loader race#2265
richiemcilroy merged 1 commit into
mainfrom
fix/web-postcss-cold-build

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Sep 9, 2026

Copy link
Copy Markdown
Member

The first production build after the Bun migration failed in Next.js 16.3 with __turbopack_context__.a is not a function while loading PostCSS. This matches the upstream cold-build runtime race: vercel/next.js#96619.

Rename the existing CommonJS config to postcss.config.cjs to avoid its asynchronous .js loader. The configuration contents, Tailwind/Autoprefixer plugins, dependencies, and build commands remain identical.

Validation: fresh Bun 1.4.0 frozen install; uncached production Turbopack build passed all 6 tasks; Next config discovery and plugin parity checked; generated failing wrapper absent; scoped Biome passed. The Vercel preview also passed all 6 build tasks with 0 Turbo cache hits and deployed successfully: https://vercel.com/mc-ilroy/cap-web/HuH92gBL33AX8CaCTcgZrFvbN1Jw.

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@richiemcilroy
richiemcilroy merged commit 8454b6b into main Sep 9, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant