This plugin is for auto import iconfont .css
file by use @ant-design/icons-vue createFromIconfontCN
method in your project
npm i vite-plugin-iconfont-css -D
# or
pnpm i vite-plugin-iconfont-css -D
# or
yarn i vite-plugin-iconfont-css -D
// vite.config.js
import { defineConfig } from 'vite';
import { IconfontCss } from 'vite-plugin-iconfont-css';
export default defineConfig({
plugins: [IconfontCss()],
});
- Type:
string[]
- Default:
['**/*.js', '**/*.jsx', '**/**/*.ts', '**/*.tsx']
Array of files, To include when scanning.