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

Feature Request: Automatic icon imports #86

Open
amritk opened this issue Aug 30, 2019 · 9 comments
Open

Feature Request: Automatic icon imports #86

amritk opened this issue Aug 30, 2019 · 9 comments

Comments

@amritk
Copy link
Contributor

amritk commented Aug 30, 2019

The custom match function has been VERY convenient, as we no longer need to import any of our components. I was wondering if there was any way to do the same but for other things such as svgs. I recently decided to start importing the extra community base material icons, and it would be even more convenient if we could tweak vuetify loader to handle these as well: https://vuetifyjs.com/en/customization/icons#install-material-design-icons-js-svg
2019-08-30:15:28:42

Not a very high priority though, close if there's more important things to worry about!

Cheers

@KaelWD
Copy link
Member

KaelWD commented Aug 31, 2019

It's possible to add, would be a fair bit of work though as we currently don't actually modify anything in the template section. You might want to follow vuetifyjs/vuetify#7821 as well.

@amritk
Copy link
Contributor Author

amritk commented Sep 3, 2019

Hey @KaelWD, actually there shouldn't be any changes to the template. All you would have to do is import it as a property and not a component. All we would need is a way to specify to vuetify loader whether to add it to the components property or data.

I can poke around the code and maybe make a pull request if I find some time.

@KaelWD
Copy link
Member

KaelWD commented Sep 4, 2019

It also needs to change mdi-account to {{ mdiAccount }} in the template. Not to mention all the other components with props like append-icon

@amritk
Copy link
Contributor Author

amritk commented Sep 4, 2019

Yea that's true, nevermind then

@mathe42
Copy link

mathe42 commented Mar 2, 2020

Hi,

I just wrote a module that injects all icon svg on build-time. (Just 130 Lines of code)...

https://github.com/mathe42/vuetify-icon-injector

I need a list for all components with the props that accept icons. (https://github.com/mathe42/vuetify-icon-injector/blob/master/src/index.ts#L6-L8)

If you think that would be nice to inlude in the vuetify-loader I would have a look how this can be done...

@ctwhome

This comment was marked as outdated.

@KaelWD

This comment was marked as outdated.

@KaelWD KaelWD changed the title Feature Request: match function to import other things Feature Request: Automatic icon imports Oct 10, 2021
@Excalibaard

This comment was marked as outdated.

@websitevirtuoso
Copy link

I am using AutoImport plugin with option to autoimport used mdiJS icons
image
and in code using just variable without import

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants