vuejs / core

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
https://vuejs.org/
MIT License
47.71k stars 8.33k forks source link

fix(runtime-core): disambiguate the `Comment` type in hydration.ts #12009

Closed Boshen closed 1 month ago

Boshen commented 1 month ago

Related: https://github.com/microsoft/TypeScript/issues/60031

oxc cannot replicate tsc's ID behavior because tsc accidently type referenced the Comment to the global in dom.d.ts

This PR renames the imported Comment type to VComment for ID to behave correctly in a non-type-reference context, oxc will keep the imported Comment type otherwise.

github-actions[bot] commented 1 month ago

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 101 kB 38 kB 34.2 kB
vue.global.prod.js 160 kB 58 kB 51.5 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 49 kB 18.9 kB 17.2 kB
createApp 55.6 kB 21.4 kB 19.6 kB
createSSRApp 59.6 kB 23.1 kB 21 kB
defineCustomElement 60.4 kB 22.9 kB 20.9 kB
overall 69.3 kB 26.5 kB 24 kB
pkg-pr-new[bot] commented 1 month ago

Open in Stackblitz

@vue/compiler-core

``` pnpm add https://pkg.pr.new/@vue/compiler-core@12009 ```

@vue/compiler-sfc

``` pnpm add https://pkg.pr.new/@vue/compiler-sfc@12009 ```

@vue/compiler-dom

``` pnpm add https://pkg.pr.new/@vue/compiler-dom@12009 ```

@vue/compiler-ssr

``` pnpm add https://pkg.pr.new/@vue/compiler-ssr@12009 ```

@vue/reactivity

``` pnpm add https://pkg.pr.new/@vue/reactivity@12009 ```

@vue/runtime-core

``` pnpm add https://pkg.pr.new/@vue/runtime-core@12009 ```

@vue/runtime-dom

``` pnpm add https://pkg.pr.new/@vue/runtime-dom@12009 ```

@vue/server-renderer

``` pnpm add https://pkg.pr.new/@vue/server-renderer@12009 ```

@vue/shared

``` pnpm add https://pkg.pr.new/@vue/shared@12009 ```

vue

``` pnpm add https://pkg.pr.new/vue@12009 ```

@vue/compat

``` pnpm add https://pkg.pr.new/@vue/compat@12009 ```

commit: 1238302