nuxt-auto-parallel-plugins

A Nuxt module to set all plugins to parallel mode by default
32,389 29
Install
npm install nuxt-auto-parallel-plugins
Latest Version:1.1.0
License:MIT
Last Updated:Mar 14, 2024
Links: GitHub  ·  npm
Maintainer: huang-julien

nuxt-auto-parallel-plugins

Set all your nuxt plugins as parallel by default, even those added by modules.

Since Nuxt 3.9, a new dependsOn property has been added, allowing all plugins to be loaded in parallel instead of sequentially while making a plugin awaiting for another plugin to be loaded.

This module simply sets the parallel property of all your nuxt plugins to true by default instead of false.

Usage

Installation

Install the package

  • npm install -D nuxt-auto-parallel-plugins
  • pnpm install -D nuxt-auto-parallel-plugins
  • yarn add -D nuxt-auto-parallel-plugins

Add the module within the nuxt config

nuxt.config.ts

export default defineNuxtconfig({
    modules: ['nuxt-auto-parallel-plugins']
})

Et voilà ! All your plugins will be parallel by default. If you don't want some specific plugins to be parallel, you can set the parallel boolean to false

export default defineNuxtPlugin({
    name: 'sequential-plugin',
    setup() {
        // ...
    },
    parallel: false
})

Module options

You can set options with parallelPlugins within your config.

export interface ModuleOptions {
  ignore: (id: string) => boolean
}

This can be useful in case you don't want some plugins injected by modules to be parallel by default.

Credits

  • @manniL for the package name

Related Packages

@scayle/storefront-nuxt

Nuxt integration for the SCAYLE Commerce Engine and Storefront API

152,903
nuxt-tsconfig-stub

Stub Nuxt's generated tsconfig.json at installation

70,835 24
kuranuxt

Look at the Nuxt 3 documentation to learn more.

871 0
nuxt-define

One utility function for module authors to define compiler constants for all bui...

13,412,511
dayjs-nuxt

Day.JS Module for Nuxt

1,986,864 126

Version History

Version Released License
1.1.0 MIT
1.0.1 MIT
1.0.0 MIT