0.0.3 • Published 2 years ago
nuxt-parallel-limit v0.0.3
nuxt-parallel-limit
Run multiple fetch with limited concurrency
Installation
Install and add nuxt-parallel-limit to your nuxt.config.
npm install -D nuxt-parallel-limit
yarn add -D nuxt-parallel-limit
pnpm add -D nuxt-parallel-limitexport default defineNuxtConfig({
modules: ['nuxt-parallel-limit'],
})Configuration
You can pass configuration to the module in the nuxt.config like following:
export default defineNuxtConfig({
modules: ['nuxt-parallel-limit'],
parallelLimit: {
patterns: [
{
pattern: 'https://jsonplaceholder.typicode.com',
limit: 2
}
]
},
})pattern:
- Type:
string - Details: The
patternspecifies a regular expression the fetch url should match. If the fetch url matches the specifiedpattern, the fetch will be limited by thelimitattribute.
limit:
- Type:
number - Details: Limit the maximum number of concurrent.
Development
- Clone this repository
- Install dependencies using pnpm install
- Stub module with
pnpm dev:prepare - Run pnpm dev to start playground in development mode
License
Made with ❤️
Published under the MIT License.