Skip to content

fix(compiler-vapor): ignore side effect tags in templates like vdom - #16453

Merged
edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-ignore-side-effect-tags
Nov 26, 2026
Merged

edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-ignore-side-effect-tags

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

A Vapor component keeps <script> and <style> from its template in the DOM, while VDOM reports "Tags with side effect (<script> and <style>) are ignored in client component templates" and drops them. So <style v-if="css">{{ css }}</style> compiles silently and renders a <style> holding the literal {{ css }}, whose rules never apply (real code, playground).

compiler-vapor has no counterpart of compiler-dom's ignoreSideEffectTags; this adds one. The tag is reported and removed before its parent handles the children, so the text and v-if branches around it compile as if it wasn't there, while a v-if / v-for on the tag itself keeps its place, as in compiler-dom. The abbreviation test now uses <title> instead of <script>.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4ec93b95-e0b2-4b07-b227-d2ffd9f80b63

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pkg-pr-new

pkg-pr-new Bot commented Nov 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@16453
npm i https://pkg.pr.new/@vue/compiler-core@16453
yarn add https://pkg.pr.new/@vue/compiler-core@16453.tgz

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@16453
npm i https://pkg.pr.new/@vue/compiler-dom@16453
yarn add https://pkg.pr.new/@vue/compiler-dom@16453.tgz

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@16453
npm i https://pkg.pr.new/@vue/compiler-sfc@16453
yarn add https://pkg.pr.new/@vue/compiler-sfc@16453.tgz

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@16453
npm i https://pkg.pr.new/@vue/compiler-ssr@16453
yarn add https://pkg.pr.new/@vue/compiler-ssr@16453.tgz

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@16453
npm i https://pkg.pr.new/@vue/compiler-vapor@16453
yarn add https://pkg.pr.new/@vue/compiler-vapor@16453.tgz

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@16453
npm i https://pkg.pr.new/@vue/reactivity@16453
yarn add https://pkg.pr.new/@vue/reactivity@16453.tgz

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@16453
npm i https://pkg.pr.new/@vue/runtime-core@16453
yarn add https://pkg.pr.new/@vue/runtime-core@16453.tgz

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@16453
npm i https://pkg.pr.new/@vue/runtime-dom@16453
yarn add https://pkg.pr.new/@vue/runtime-dom@16453.tgz

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@16453
npm i https://pkg.pr.new/@vue/runtime-vapor@16453
yarn add https://pkg.pr.new/@vue/runtime-vapor@16453.tgz

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@16453
npm i https://pkg.pr.new/@vue/server-renderer@16453
yarn add https://pkg.pr.new/@vue/server-renderer@16453.tgz

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@16453
npm i https://pkg.pr.new/@vue/shared@16453
yarn add https://pkg.pr.new/@vue/shared@16453.tgz

vue

pnpm add https://pkg.pr.new/vue@16453
npm i https://pkg.pr.new/vue@16453
yarn add https://pkg.pr.new/vue@16453.tgz

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@16453
npm i https://pkg.pr.new/@vue/compat@16453
yarn add https://pkg.pr.new/@vue/compat@16453.tgz

commit: b75b3e1

@github-actions

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.5 kB 30.7 kB 26.9 kB
runtime-dom.global.prod.js 127 kB 47.3 kB 42.3 kB
vue.global.prod.js 187 kB 67.6 kB 60.2 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 55.8 kB 21.7 kB 19.8 kB
createApp 65.3 kB 25.2 kB 22.9 kB
createApp + vaporInteropPlugin 127 kB 46.3 kB 41.6 kB
createVaporApp 36.7 kB 14 kB 12.9 kB
createSSRApp 70.2 kB 27.2 kB 24.7 kB
createVaporSSRApp 45.5 kB 17.3 kB 15.9 kB
defineCustomElement 71.9 kB 27.2 kB 24.7 kB
defineVaporCustomElement 51.8 kB 18.9 kB 17.3 kB
overall 82.5 kB 31.2 kB 28.2 kB

Apps

Name Size Gzip Brotli
counter app (CAPI only) 57.4 kB 22.3 kB 20.3 kB
counter vapor app (CAPI only) 46.9 kB 17.5 kB 16.1 kB
todo app (CAPI only) 73.7 kB 28.3 kB 25.7 kB
todo vapor app (CAPI only) 80.3 kB 29.6 kB 27 kB

@edison1105 edison1105 added the scope: vapor related to vapor mode label Nov 26, 2026
@edison1105
edison1105 merged commit 6c96dd7 into vuejs:minor Nov 26, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: vapor related to vapor mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants