Repository navigation
fix(vite): preserve Vue plugin imports and canonical runtime bridge - #11555
Open
rafaelaugustos wants to merge 1 commit into
Open
rafaelaugustos wants to merge 1 commit into
rafaelaugustos wants to merge 1 commit into
Conversation
This was referenced Oct 19, 2026
Draft
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
What is the current behavior?
Vue HMR rewrites dependencies whose names merely start with
vueto/ns/rt, losing their exports. A per-module-served native plugin importing$navigateToandreffromnativescript-vuecan also receive duplicate helper bindings and the obsolete/ns/m/@nativescript/vendor.mjsURL.What is the new behavior?
Match Vue runtime package boundaries and send the Vue strategy's framework imports directly to
/ns/rt. Unrelated package imports retain their original destination, and the complete device transformation pipeline produces valid JavaScript for native navigation helpers.Fixes #11554. Related to #11421; this does not claim to fix every dependency-routing case in that report.
Validation
nx run vite:test: 1,842 passed, five failed. All five failures are intypescript-optional.spec.ts, reportingThe "paths[1]" argument must be of type string. Received undefined. Running that spec with both changed implementation files restored to base3224f1breproduces the same five failures (two passing).nx format:writeon changed files;git diff --checkpasses.@nativescript/vite8.0.19. The patch is verified through transformation tests, not a patched native package installation. Full file-routing native HMR remains separately blocked by the SFC assembler bypassing compile-time macro transforms. Bundled--no-hmrnavigation is successful on iOS and Android with stock dependencies.Manual follow-up: serve a linked plugin importing NativeScript-Vue navigation helpers through HTTP, then verify startup and a native push. Also verify an unrelated
vue-*dependency keeps its own exports after optimization.