Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 690 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 690 Bytes

vite-plugin-iconfont-css

This plugin is for auto import iconfont .css file by use @ant-design/icons-vue createFromIconfontCN method in your project

Install

npm i vite-plugin-iconfont-css -D
# or
pnpm i vite-plugin-iconfont-css -D
# or
yarn i vite-plugin-iconfont-css -D

Usage

// vite.config.js

import { defineConfig } from 'vite';
import { IconfontCss } from 'vite-plugin-iconfont-css';

export default defineConfig({
  plugins: [IconfontCss()],
});

Options

include

  • Type: string[]
  • Default: ['**/*.js', '**/*.jsx', '**/**/*.ts', '**/*.tsx']

Array of files, To include when scanning.