[PR #593] [MERGED] fix: throw errors when next config file loading fails #694

Closed
opened 2026-05-06 13:09:35 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/593
Author: @james-elicx
Created: 3/19/2026
Status: Merged
Merged: 3/19/2026
Merged by: @james-elicx

Base: mainHead: james/throw-config-parse-error


📝 Commits (2)

  • 41e5258 fix: throw errors when next config parse fails
  • d6fe022 add unit test

📊 Changes

2 files changed (+31 additions, -4 deletions)

View changed files

📝 packages/vinext/src/config/next-config.ts (+5 -3)
📝 tests/next-config.test.ts (+26 -1)

📄 Description

failures loading a Next.js config (e.g. due to CJS require statements) should fail a build, otherwise it produces an output that disregards the user's configuration (e.g. pageExtensions), creating incorrect/invalid bundles and giving a confusing experience.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/593 **Author:** [@james-elicx](https://github.com/james-elicx) **Created:** 3/19/2026 **Status:** ✅ Merged **Merged:** 3/19/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `james/throw-config-parse-error` --- ### 📝 Commits (2) - [`41e5258`](https://github.com/cloudflare/vinext/commit/41e5258744c12eba3ba0205fbe22207c0ea545ba) fix: throw errors when next config parse fails - [`d6fe022`](https://github.com/cloudflare/vinext/commit/d6fe0228fa2f562663dce1081e12f55ff69e005d) add unit test ### 📊 Changes **2 files changed** (+31 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/config/next-config.ts` (+5 -3) 📝 `tests/next-config.test.ts` (+26 -1) </details> ### 📄 Description failures loading a Next.js config (e.g. due to CJS require statements) should fail a build, otherwise it produces an output that disregards the user's configuration (e.g. pageExtensions), creating incorrect/invalid bundles and giving a confusing experience. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:09:35 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#694
No description provided.