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

vite-file-cache-plugin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-file-cache-plugin

vite cache file plugin

latest
Source
npmnpm
Version
1.0.0-beta.3
Version published
Maintainers
1
Created
Source

Vite file cache plugin

  • Applicable to single files with long compilation time and low change frequenc.
  • Such as global sass and less file, or component.
  • Support hmr do not restart.

Install

npm install vite-file-cache-plugin --save-dev

Usage

vite.config.ts

import fileCahcePlugin from 'vite-file-cache-plugin'
export default defineConfig({
  plugins: [
    vue(),
    fileCahcePlugin({
      matchFn: (id) => id.includes('/src/styles/index.less')
    })
  ]
})

Options

functiondescriptioncallback parameter
matchFnassess whether to cache file(id?: string) id: vite module id

Keywords

vite

FAQs

Package last updated on 20 Dec 2022

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