Skip to content

fix(vite): decode dots in prebundled subpath specifiers - #11466

Merged
NathanWalker merged 2 commits into
mainfrom
fix/vite-prebundle-subpath-dots
Sep 29, 2026
Merged

NathanWalker merged 2 commits into
mainfrom
fix/vite-prebundle-subpath-dots

Conversation

@triniwiz

Copy link
Copy Markdown
Member

PR Checklist

What is the current behavior?

Vite's flattenId encodes / as _ and . as __. viteDepsPathToBareSpecifier (and the shared-alias lookup next to it) decoded a vendored package's subpath by turning every _ into /, so dots came back as //. For example, pkg_lib_file__js became pkg/lib/file//js, and the request 404'd.

What is the new behavior?

One decodeFlattenedSubpath helper decodes __ to . first, then _ to /, and both decode sites use it.

Tests: packages/vite/hmr/server/websocket-module-specifiers.prebundle.spec.ts (3) covers a dotted subpath, an extensionless subpath, a scoped package, and the package's own prebundle.

@nx-cloud

nx-cloud Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 0fc690a

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 3m 43s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-09-29 22:05:00 UTC

@pkg-pr-new

pkg-pr-new Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nativescript/core@11466
npm i https://pkg.pr.new/@nativescript/vite@11466
npm i https://pkg.pr.new/@nativescript/webpack@11466

commit: 0fc690a

@triniwiz
triniwiz force-pushed the fix/vite-prebundle-subpath-dots branch from 142437a to 9f2916f Compare September 28, 2026 04:56
@triniwiz
triniwiz changed the base branch from feat/windows to main September 28, 2026 04:56
@NathanWalker
NathanWalker merged commit fbd4ced into main Sep 29, 2026
10 checks passed
@NathanWalker
NathanWalker deleted the fix/vite-prebundle-subpath-dots branch September 29, 2026 22:23
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.

2 participants