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

Option to disable "inferred as global component" warning #197

Closed
richardtallent opened this issue Feb 9, 2021 · 7 comments
Closed

Option to disable "inferred as global component" warning #197

richardtallent opened this issue Feb 9, 2021 · 7 comments
Labels
documentation Improvements or additions to documentation Stale

Comments

@richardtallent
Copy link

Is your feature request related to a problem? Please describe.
I have a number of globally-registered components, and I do this quite on purpose. VueDX is throwing warnings because of this, and there does not appear to be a way to disable this metric. Global registration of components is not always appropriate, but it should not always result in a warning.

Describe the solution you'd like
An option to disable this rule, and documentation for how to use the option.

Describe alternatives you've considered
Registering components locally is an alternative, but is untenable due to the number of potential code changes this would require.

@richardtallent richardtallent added the feature-request A new feature request label Feb 9, 2021
@olemarius
Copy link

Just spent a few hours trying to get rid of this warning. Would be great to be able to supress the warning.

@znck
Copy link
Collaborator

znck commented Feb 13, 2021

You can configure global components using vueconfig.json, e.g. https://github.com/znck/vue-developer-experience/blob/main/samples/feature-vue-project-configured/vueconfig.json

@znck znck added documentation Improvements or additions to documentation and removed feature-request A new feature request labels Feb 13, 2021
@merceyz
Copy link

merceyz commented Feb 13, 2021

I also ran into this and looked at the samples folder to find that config, I specified it to include vuetify and the warnings were gone and it autocompletes the vuetify components but not their attributes

@znck
Copy link
Collaborator

znck commented Feb 13, 2021

Attribute completion depends on type definitions but it will support web types soon.

@vegerot
Copy link

vegerot commented Feb 18, 2021

I also ran into this and looked at the samples folder to find that config, I specified it to include vuetify and the warnings were gone and it autocompletes the vuetify components but not their attributes

How do you specify vueconfig.json to include vuetify?

@merceyz
Copy link

merceyz commented Feb 19, 2021

I created a vueconfig.json in the root containing

{
	"globalComponents": ["vuetify"]
}

@webliving
Copy link

The component 'van-circle' is inferred as global component. It may not be available at runtime.VueDX(59002)

@znck znck added the Stale label Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Stale
Projects
None yet
Development

No branches or pull requests

6 participants