Skip to content

javascript: a .vue template tag links to the component it renders - #1791

Merged
swapnilpaliwal-sd merged 2 commits into
0.1.9from
loop/ja-is1775
Sep 29, 2026
Merged

swapnilpaliwal-sd merged 2 commits into
0.1.9from
loop/ja-is1775

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor
  • A .vue template tag in a JavaScript component (<Child/>) is now a JSX_ELEMENT, so the JSX render rules apply to it: an imported single-file component (<script setup> or an Options API object) reaches its module initializer; a defineComponent(...) or function component renders as before.
  • A .vue import through a path alias (@/components/Child.vue, from jsconfig or vite.config resolve.alias) now resolves.
  • New case 72-vue-component-tag with controls: a plain-object "component" and an aliased .vue that does not exist stay ambiguous_unknown; aliased .js imports unchanged.
  • Checked: JS golden 87/87 (with oracle), TS golden 96/96, parser JS/TS 49/49. Fixture known_edge 7 → 13 (ambiguous 10 → 4); a real JS Vue app 91 → 93, index time 4.5s → 4.9s.

Closes #1775

A <Child/> in a JavaScript .vue component was a FUNCTION_CALL of Child,
ambiguous_unknown whenever Child was a single-file component. The tag is now
a JSX_ELEMENT, so the JSX rules apply: a function or definer component renders
as before, and an imported .vue component with no rendering default export
(<script setup>, Options API object) reaches its module initializer.

A .vue specifier through a path alias (@/components/Child.vue) is mapped
through compilerOptions.paths, as tsc maps any other aliased import.

Closes #1775

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
Conflict in decls_all.dl with #1789: keep both sets of jsx declarations.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit f7a84eb into 0.1.9 Sep 29, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the loop/ja-is1775 branch September 29, 2026 17:21
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.

1 participant