Find whether there are duplicate images in the project
Configuration Option Name | Required | Meaning | Default Value | Type |
---|---|---|---|---|
imagePath |
No | The image path to be searched | src | string |
imageType |
No | The image types to be searched | ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.svg', '.webp'] | Array<string> |
outputResourcePathFormat |
No | The output resource path format | false | Boolean |
npm install vite-plugin-image-duplicates -D
// or
pnpm add vite-plugin-image-duplicates -D
- vue.config.js
import imageDuplicates from 'vite-plugin-image-duplicates'
export default defineConfig({
plugins: [vue(), imageDuplicates()],
})