vite-plugin-find-image-duplicates
v0.0.10
Published
Find out if there are duplicate images in the project
Downloads
10
Readme
简体中文 | English
配置项
| 配置项名称 | 是否必须 | 含义 | 类型 | 举例 |
| ----------------- | ------------ | ---------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------------- |
| imagePath
| 否 | 需要查找的图片路径 ,默认 src/assets/images
| Array<string>
| findImageDuplicates({ imagePath: ["src/assets/images", ...] })
|
| imageType
| 否 | 需要查找的图片类型,默认'.jpg', '.jpeg', '.png', '.gif', '.bmp', '.svg', '.webp'
| Array<string>
| findImageDuplicates({ imageType: ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.svg', '.webp',...] })
|
| exitOnDuplicate
| 否 | 找到重复图片以后是否要退出进程 ,默认 ture
退出进程 | Boolean
| findImageDuplicates({ exitOnDuplicate:false })
|
安装
npm install vite-plugin-find-image-duplicates -D
pnpm add vite-plugin-find-image-duplicates -D
用法
- vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import findImageDuplicates from 'vite-plugin-find-image-duplicates'
export default defineConfig({
plugins: [vue(), findImageDuplicates({ imagePath: ['src/assets/images/recur'], exitOnDuplicate: false })]
})