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

[Warnings] Silence Vue warnings in DEV #642

Open
LaurentLord opened this issue Feb 7, 2024 Discussed in #634 · 0 comments
Open

[Warnings] Silence Vue warnings in DEV #642

LaurentLord opened this issue Feb 7, 2024 Discussed in #634 · 0 comments

Comments

@LaurentLord
Copy link

Discussed in #634

Originally posted by LaurentLord January 18, 2024
For compatibility reasons, I have to register my package twice (with different parameters).

As a result, I get this error message: "Component "X" has already been registered in target app.".
However, I can't ignore these errors during development. In other words, my console is polluted by these multiple errors.
Note that warnHandler doesn't catch them.

Is it possible to provide the option of silencing some messages?

// core/packages/runtime-core/src/apiCreateApp.ts
if (__DEV__ && context.components[name]) {
  warn(`Component "${name}" has already been registered in target app.`)
}

Source: https://github.com/vuejs/core/blob/ee4cd78a06e6aa92b12564e527d131d1064c2cd0/packages/runtime-core/src/apiCreateApp.ts#L278

Thanks

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

No branches or pull requests

1 participant