unplugin-limit-files
v0.2.4
Published
[![NPM version](https://img.shields.io/npm/v/unplugin-limit-files?color=a1b858&label=)](https://www.npmjs.com/package/unplugin-limit-files)
Downloads
5
Maintainers
Readme
unplugin-limit-files
Install
pnpm i -D unplugin-limit-files
// vite.config.ts
import LimitFiles from 'unplugin-limit-files/vite'
import { TimeUnit } from 'unplugin-limit-files/types'
export default defineConfig({
plugins: [
LimitFiles({
filePattern: ['./pkg/*.zip'],
limit: {
latestTime: 'create',
date: {
unit: TimeUnit.MINUTE,
times: 60,
},
num: 3,
},
})
],
})
// rollup.config.js
import LimitFiles from 'unplugin-limit-files/rollup'
export default {
plugins: [
LimitFiles({
/* options */
})
],
}
// rspack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-limit-files/rspack')({
/* options */
}),
],
}
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-limit-files/webpack')({
/* options */
}),
],
}
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-limit-files/webpack')({
/* options */
}),
],
},
}
// esbuild.config.js
import { build } from 'esbuild'
import LimitFiles from 'unplugin-limit-files/esbuild'
build({
plugins: [
LimitFiles(
/* options */
)
],
})