[PR #522] [MERGED] fix: add missing .js alias variants for next/config and next/amp #642

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

📋 Pull Request Information

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

Base: mainHead: fix/missing-js-aliases


📝 Commits (1)

  • de89ad1 fix: add missing .js alias variants for next/config and next/amp (#521)

📊 Changes

2 files changed (+41 additions, -0 deletions)

View changed files

📝 packages/vinext/src/index.ts (+2 -0)
📝 tests/shims.test.ts (+39 -0)

📄 Description

Closes #521

Summary

  • Adds missing next/config.js and next/amp.js alias entries to the shim map
  • Every other public next/* entrypoint already had both next/<name> and next/<name>.js variants — these two were the only ones missing
  • Libraries that import with the explicit .js extension (e.g., nuqs imports next/navigation.js) would fail to resolve for config and amp

Test plan

  • Added regression test: verifies all top-level next/* aliases have a .js variant, so future additions can't miss it
  • Test verified RED before fix (reported next/config and next/amp as missing)
  • Test verified GREEN after fix
  • All 666 shims tests pass
  • CI: format, lint, typecheck, vitest, playwright

🔄 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/522 **Author:** [@NathanDrake2406](https://github.com/NathanDrake2406) **Created:** 3/13/2026 **Status:** ✅ Merged **Merged:** 3/13/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `fix/missing-js-aliases` --- ### 📝 Commits (1) - [`de89ad1`](https://github.com/cloudflare/vinext/commit/de89ad103cbc234f65c61016f1766d7f1f2db6df) fix: add missing .js alias variants for next/config and next/amp (#521) ### 📊 Changes **2 files changed** (+41 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/index.ts` (+2 -0) 📝 `tests/shims.test.ts` (+39 -0) </details> ### 📄 Description Closes #521 ## Summary - Adds missing `next/config.js` and `next/amp.js` alias entries to the shim map - Every other public `next/*` entrypoint already had both `next/<name>` and `next/<name>.js` variants — these two were the only ones missing - Libraries that import with the explicit `.js` extension (e.g., `nuqs` imports `next/navigation.js`) would fail to resolve for `config` and `amp` ## Test plan - [x] Added regression test: verifies **all** top-level `next/*` aliases have a `.js` variant, so future additions can't miss it - [x] Test verified RED before fix (reported `next/config` and `next/amp` as missing) - [x] Test verified GREEN after fix - [x] All 666 shims tests pass - [ ] CI: format, lint, typecheck, vitest, playwright --- <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:16 +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#642
No description provided.