Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

edison1105
Copy link
Member

close #9981

Copy link

github-actions bot commented Jan 4, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 89.4 kB 34 kB 30.7 kB
vue.global.prod.js 146 kB 53.3 kB 47.6 kB

Usages

Name Size Gzip Brotli
createApp 49.7 kB 19.5 kB 17.8 kB
createSSRApp 53.1 kB 20.8 kB 19 kB
defineCustomElement 52 kB 20.2 kB 18.5 kB
overall 63.2 kB 24.4 kB 22.2 kB

@yyx990803
Copy link
Member

The original clone logic was causing issue because it clones Set into empty objects, but since scopeIds is the only thing and it doesn't need to be cloned, the simpler fix is to make sure the object clone logic only applies to real plain objects (a4bcbe8). Set and Map can be reused as-is assuming they are immutable on the ASTs.

Also, there are faster ways to clone Sets and Maps, because both are iterable and both accept interables as the constructor argument:

const clonedSet = new Set(originalSet)
const clonedMap = new Map(originalMap)

@yyx990803 yyx990803 merged commit 7dbdb3e into vuejs:main Jan 4, 2024
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.

In Astro SSG, scoped slots are breaking the build
3 participants