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

window.devtoolsFormatters increase on update #10466

Open
hyrious opened this issue Mar 6, 2024 · 2 comments · May be fixed by #10472
Open

window.devtoolsFormatters increase on update #10466

hyrious opened this issue Mar 6, 2024 · 2 comments · May be fixed by #10472
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. has PR A pull request has already been submitted to solve the issue scope: playground

Comments

@hyrious
Copy link

hyrious commented Mar 6, 2024

Note a severe issue. It is caused by Vue in dev mode updates window.devtoolsFormatters on load itself and the REPL reuses the same iframe on each successful compile. Reproduction:

  1. Goto https://play.vuejs.org/
  2. Open devtools and switch the console context to about:srcdoc
  3. Look at window.devtoolsFormatters, edit something, and look at it gain
@sxzz
Copy link
Member

sxzz commented Mar 6, 2024

Not related to @vue/repl, moved it to the Vue core repo.

useCode: `initCustomFormatter()`,

@sxzz sxzz transferred this issue from vuejs/repl Mar 6, 2024
@sxzz
Copy link
Member

sxzz commented Mar 6, 2024

  • initCustomFormatter should avoid duplicated formatter
  • should move customCode.useCode to headHTML.

@baiwusanyu-c baiwusanyu-c linked a pull request Mar 7, 2024 that will close this issue
@sodatea sodatea added scope: playground has PR A pull request has already been submitted to solve the issue 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Mar 13, 2024
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. has PR A pull request has already been submitted to solve the issue scope: playground
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants