Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/wChenonly/vite-plugin-find-image-duplicates

Find out if there are duplicate images in the project
https://github.com/wChenonly/vite-plugin-find-image-duplicates

Last synced: about 2 months ago
JSON representation

Find out if there are duplicate images in the project

Lists

README

        

vite-plugin-find-image-duplicates


Find if there are duplicate images in your project when building it


NPM version
NPM Downloads

English | [简体中文](./README.zh_CN.md)

## Configuration

| **configuration item name** | **must** | **meaning** | **type** | **example** |
| --------------------------- | -------- | ----------------------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------------- |
| `imagePath` | No | The image path to be found, default `src/assets/images` | `Array` | `findImageDuplicates({ imagePath: ["src/assets/images", ...] })` |
| `imageType` | No | The type of image you need to find, default`'.jpg', '.jpeg', '.png', '.gif', '.bmp', '.svg', '.webp'` | `Array` | `findImageDuplicates({ imageType: ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.svg', '.webp',...] })` |
| `exitOnDuplicate` | No | Whether to exit the process after finding the duplicate picture, by default `ture` Exit the process | `Boolean` | `findImageDuplicates({ exitOnDuplicate:false })` |

## Install

```bash
npm install vite-plugin-find-image-duplicates -D
pnpm add vite-plugin-find-image-duplicates -D
```

## Usage

- vite.config.ts

```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 })]
})
```

## License

[MIT © wChenonly-latest](./LICENSE)