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

refac(runtime-core): Make the execution process smoother. #11965

Closed zhangenming closed 2 months ago

github-actions[bot] commented 2 months ago

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 101 kB (-8 B) 37.9 kB (-3 B) 34.1 kB (-21 B)
vue.global.prod.js 159 kB (-8 B) 57.9 kB (-1 B) 51.4 kB (+1 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 48.8 kB 18.8 kB 17.2 kB
createApp 55.4 kB 21.3 kB 19.4 kB
createSSRApp 59.4 kB 23 kB 21 kB
defineCustomElement 60.2 kB 22.9 kB 20.9 kB
overall 69.1 kB 26.4 kB 24 kB
pkg-pr-new[bot] commented 2 months ago

Open in Stackblitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/reactivity

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

@vue/compiler-ssr

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

@vue/runtime-dom

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

@vue/runtime-core

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

@vue/shared

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

@vue/server-renderer

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

@vue/compat

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

vue

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

commit: bf7faaf

edison1105 commented 2 months ago

Thanks for the PR. But, this PR is unnecessary.

zhangenming commented 2 months ago

sorry, but are you sure? I don't understand the false inside forEach, I don't think it's gonna do anything @edison1105 :)

edison1105 commented 2 months ago

@zhangenming this forEach is forEachElement , please notice line 117 https://github.com/vuejs/core/blob/f2482b5b163aac94a38ad4d0025f3c50f7103535/packages/runtime-core/src/hydrationStrategies.ts#L115-L119

zhangenming commented 2 months ago

oh...thanks... Mistaking forEach for Array.prototype.forEach