New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vite-plugin-webp-and-path

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-webp-and-path

This Vite plugin automatically converts image files to WebP format and updates image paths in HTML and CSS files within your project.

latest
Source
npmnpm
Version
0.1.4
Version published
Weekly downloads
35
Maintainers
1
Weekly downloads
 
Created
Source

Vite Plugin Webp And Path

Description

This Vite plugin converts images to WebP format and updates their paths in HTML and CSS files.

Installation

npm install vite-plugin-webp-and-path

Usage

In your vite.config.js:

import VitePluginWebpAndPath from 'vite-plugin-webp-and-path';

export default {
  plugins: [
    VitePluginWebpAndPath({
      // options
    }),
  ],
};

Options

  • targetDir: Target directory to search for image files. Default is ./dist/.
  • imgExtensions: Comma-separated list of image file extensions to convert. Default is jpg,png.
  • textExtensions: Comma-separated list of text file extensions to update image paths in. Default is html,css.
  • quality: Quality of the converted WebP images. Default is 80.
  • enableLogs: Enable logs. Default is true.

License

MIT

Keywords

vite

FAQs

Package last updated on 04 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts