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

add more globalsAllowList item. #12085

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

Conversation

zhangenming
Copy link
Contributor

@zhangenming zhangenming commented Sep 30, 2024

image

image

some Situations encountered during the coding process

Copy link

pkg-pr-new bot commented Sep 30, 2024

Open in Stackblitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-ssr

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

@vue/compiler-sfc

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

@vue/runtime-core

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

@vue/reactivity

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

@vue/runtime-dom

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

@vue/shared

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

@vue/server-renderer

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

@vue/compat

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

vue

pnpm add https://pkg.pr.new/vue@12085

commit: 286e08e

Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 101 kB (+26 B) 38.1 kB (+15 B) 34.2 kB (-17 B)
vue.global.prod.js 160 kB (+26 B) 58 kB (+13 B) 51.5 kB (+15 B)

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 23 kB 20.9 kB
overall 69.3 kB 26.5 kB 24.1 kB

@jacekkarczmarczyk
Copy link
Contributor

#7939 (comment)

The template global whitelist has always only included language-level globals (as defined in ECMA-262)

window and document aren't language-level globals, they are environment-specific globals provided by the browser

@Smrtnyk
Copy link

Smrtnyk commented Sep 30, 2024

window and document aren't language-level globals, they are environment-specific globals provided by the browser

I guess same applies to setTimeout as well, since he added it also to the list

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.

3 participants