Vue 3 CLI and Auto Importing
Hello!
How to setup vue.config.js in order to support Auto Importing feature? I can't use "import from..." there, so can't do it like this (taken from the https://github.com/antfu/unplugin-icons#auto-importing):
import Icons from 'unplugin-icons/vite'
import IconsResolver from 'unplugin-icons/resolver'
import Components from 'unplugin-vue-components/vite'
Seems like I need to use "require", but how can I specify resolver for the unplugin-vue-components plugin?
Thanks!
const Icons = require('unplugin-icons/vite')
const IconsResolver = require('unplugin-icons/resolver')
const Components = require('unplugin-vue-components/vite')
Like this?
Yeah, I tried it first, but... Still have the question: "how can I specify a resolver for the unplugin-vue-components plugin?", in our case - for Components. Using your schema I can just create several objects, but how can I set it up so it uses the correct iconsResolver?
Thanks!
BTW - my bad, I had to write the correct import section, it would be like this (so - 'webpack' but not 'vite'):
import Icons from 'unplugin-icons/webpack'
import IconsResolver from 'unplugin-icons/resolver'
import Components from 'unplugin-vue-components/webpack'