npm i -D unplugin-auto-import
npm i unplugin-vue-components -D
npm i -D unplugin-icons
npm i -D @iconify/json
npm install element-plus --save
// vite.config.ts
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import Icons from 'unplugin-icons/vite'
import IconsResolver from 'unplugin-icons/resolver'
export default defineConfig({
plugins: [
AutoImport({
imports: ['vue', 'vue-router'],
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver(), IconsResolver()],
}),
Icons(),
],
})
Visual Studio Code
// .prettierrc
{
"singleQuote": true,
"semi": false
}
- 选择语言模式
- ".svg"的配置文件关联...
- HTML
❗️1rem = 1px❗️