vuetify-loader
vuetify-loader copied to clipboard
Feature Request: Automatic icon imports
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
Not a very high priority though, close if there's more important things to worry about!
Cheers
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 https://github.com/vuetifyjs/vuetify/issues/7821 as well.
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.
It also needs to change mdi-account
to {{ mdiAccount }}
in the template. Not to mention all the other components with props like append-icon
Yea that's true, nevermind then
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...
Any thoughts on this, or plan to work with?
Yes
Is there an ETA for this feature, and will it be available for Vuetify 2?
I am using AutoImport plugin with option to autoimport used mdiJS icons
and in code using just variable without import