Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(compiler-core): support browser environment for walkIdentifiers #13016

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhiyuanzmj
Copy link
Member

@zhiyuanzmj zhiyuanzmj commented Mar 10, 2025

For Vue@3.2.5 walkIdentifiers deps isReferenced from @babel/types, so Evan removed browser support.
But this PR added the isReferenced function by built-in, so can we remove browser-check flag to support browser?

Before

./dist size: 617 KB
image

After

./dist size: 624 KB
image

Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB 38.1 kB 34.3 kB
vue.global.prod.js 158 kB 58 kB 51.6 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 46.5 kB 18.2 kB 16.7 kB
createApp 54.6 kB 21.3 kB 19.4 kB
createSSRApp 58.8 kB 23 kB 21 kB
defineCustomElement 59.4 kB 22.9 kB 20.8 kB
overall 68.6 kB 26.4 kB 24.1 kB

Copy link

pkg-pr-new bot commented Mar 10, 2025

Open in Stackblitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@13016

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@13016

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@13016

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@13016

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@13016

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@13016

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@13016

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@13016

@vue/shared

npm i https://pkg.pr.new/@vue/shared@13016

vue

npm i https://pkg.pr.new/vue@13016

@vue/compat

npm i https://pkg.pr.new/@vue/compat@13016

commit: be8e372

@edison1105 edison1105 added ready to merge The PR is ready to be merged. scope: compiler 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. ready to merge The PR is ready to be merged. scope: compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants