A vite plugin to limit the speed of specific files from ViteDevServer to your browser in development mode.
# npm
npm i vite-plugin-rate-limiter -D
# yarn
yarn add vite-plugin-rate-limiter -D
# pnpm
pnpm add vite-plugin-rate-limiter -D
// vite.config.ts
import { defineConfig } from 'vite'
import { ViteRateLimiter } from 'vite-plugin-rate-limiter'
export default defineConfig({
plugins: [
ViteRateLimiter({
rate: 100, // 100 kb/s
matchOpts: '**/*.glb'
}),
]
})
Sometimes we need to simulate poor network environments, but damn local development server is so fast, now you can limit the speed of specific files to your browser in development mode with this plugin. 🐢
MIT License © 2022 Archer Gu