vite-plugin-image-prefetch
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

vite-plugin-image-prefetch

A simple plugin of vite for prefetch images.

Install

pnpm add vite-plugin-image-prefetch -D

Usage

In vite.config.ts:

import { vitePluginPrefetchImages } from 'vite-plugin-image-prefetch'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    vitePluginPrefetchImages({
      dir: 'images/**/*.{jpg,jpeg,png,svg}'
    })
  ]
})

Package Sidebar

Install

npm i vite-plugin-image-prefetch

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

6.08 kB

Total Files

7

Last publish

Collaborators

  • icenode