Skip to content

fix(externals): normalize resolved paths on windows - #4752

Merged
pi0 merged 1 commit into
v2from
fix/externals-windows
Oct 15, 2026
Merged

pi0 merged 1 commit into
v2from
fix/externals-windows

Conversation

@danielroe

@danielroe danielroe commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves #4611

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

on Windows, Nuxt 4 builds print a DEP0155 warning about the "./" trailing slash pattern in @vue/shared. It doesn't happen on Linux or macOS, e.g. this one in a recent test run for nuxt/fonts:

(node:2056) [DEP0155] DeprecationWarning: Use of deprecated trailing slash pattern mapping "./" in the "exports" field module resolution of the package at D:\a\fonts\fonts\node_modules\.pnpm\[email protected]_7e2bb53910f1f82410861446d7f5150c\node_modules\@vue\shared\package.json imported from D:\a\fonts\fonts\node_modules\.pnpm\[email protected]_7e2bb53910f1f82410861446d7f5150c\node_modules\nuxt\dist\runtime\server\renderer\error-template.js. Mapping specifiers ending in "/" is no longer supported.
(Use `node.EXE --trace-deprecation ...` to show where the warning was created)

the cause is a separator mismatch in node-externals, and the absolute path never matches the result of tryResolve, which returns a path with native backslashes on Windows

for a root export, that guess is @vue/shared/, which is what triggers the deprecation warning. the resolved guess is then compared in the same way, so it never matches either and the package gets inlined instead of externalized.

Note

although I spotted this due to the log, I think this is also the cause of some performance issues with nitro v2 on windows

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe
danielroe requested a review from pi0 as a code owner October 8, 2026 10:25
@vercel

vercel Bot commented Oct 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nitro.build Ready Ready Preview Oct 8, 2026 10:25am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 687a29bb-a113-4b40-b0ce-39b86fffc633

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nitropack@4752

commit: 57b6941

This branch was successfully deployed

1 active deployment
Preview — 57b6941d Deployed Oct 8, 2026 by vercel[bot]
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.

3 participants