Repository navigation
typescript, javascript: index Vue single-file components - #1738
Merged
Merged
Conversation
A .vue file was never read, so a helper called only from a template had no caller and a component rendered only by a template had no use. Each .vue component is now read as a virtual script that keeps every line: its inline <script>/<script setup> bodies verbatim, plus one top-level statement per template reference (<Child/> and <my-child> as calls, @event handlers as calls or statements, bound expressions and {{ }} as expressions). lang=ts/tsx goes to the TypeScript analyzer, a JavaScript script to the JavaScript one; a component with no inline script is not analysed. tsconfig include globs claim .vue files and relative ./X.vue imports resolve to the component. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 29, 2026 01:34
This was referenced Sep 29, 2026
Merged
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.
.vuefiles were never read, so a helper called only from a template had no caller, and a component rendered only by a template had no use..vuecomponent is read as a virtual script that keeps every line: the<script>/<script setup>bodies verbatim, plus one statement per template reference (<Child/>/<my-child>→ call,@evt="fn"→fn(), inline handlers,:x/v-if/{{ }}expressions).lang="ts"|"tsx"goes to the TS analyzer, JS (or nolang) to the JS analyzer. A.vuewith no inline script adds nothing.includeclaims.vuefiles; relative./X.vueimports resolve to the component.80-vue-sfc, JS69-vue-sfc. Controls: a template-only.vue, and a.vuein the other language.Checked: TS suite 90/90, JS suite 79/79, parser TS 49/49, JS 48/48. Repro
impact sfcHelper: nothing →[resolved] src/Comp.vue:5. Real Vue 3 app: call edges 144 → 477, index 8.0s → 8.6s.