Skip to content

Conversation

@KazariEX
Copy link
Member

@KazariEX KazariEX commented Nov 23, 2025

fix #4539, fix #5492, fix vuejs/core#12258, close #5765

This change simplifies the transforms of the template AST, in particular by removing all codegenNode that existed only for runtime codegen purpose. This also results in an AST shape that is more favorable for language tools integration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 23, 2025

Open in StackBlitz

vue-component-meta

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-meta@5769

vue-component-type-helpers

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@5769

@vue/language-core

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-core@5769

@vue/language-plugin-pug

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@5769

@vue/language-server

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-server@5769

@vue/language-service

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-service@5769

vue-tsc

npm i https://pkg.pr.new/vuejs/language-tools/vue-tsc@5769

@vue/typescript-plugin

npm i https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@5769

commit: 2c69879

@KazariEX KazariEX force-pushed the refactor/transforms branch from 2df73c5 to ec9da65 Compare November 27, 2025 17:59
@KazariEX KazariEX marked this pull request as ready for review November 27, 2025 18:01
<div v-else-if="cond1.length"></div>

<template #default v-if="cond1 === true">1</template>
<template #default v-else-if="cond1.length">2</template>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fixture of v-else-if="cond1.length" is for checking type narrowing

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the combination of v-slot and v-if is no longer a special case, we should no need to repeat existing test cases for type narrowing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants