2.1.34 • Published 12 months ago

nuxt-push-plugins v2.1.34

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

nuxt-push-plugins

Pushes Nuxt.js plugins to the end of the list instead of the start.

When calling this.addPlugin inside a Nuxt module, Nuxt does in fact not add the plugin to the end of the list, but to the beginning via Array.unshift. There are cases where you actually want to push plugins to the end of the list so that they can make use of already-added plugins. This package provides a helper function to do that.

Install

# npm
$ npm install nuxt-push-plugins

# Yarn
$ yarn add nuxt-push-plugins

Usage

Import the function into your Nuxt module and call it by passing this and the plugins you want to add. It behaves like Array.push.

// module.js

import nuxtPushPlugins from 'nuxt-push-plugins'

export default function () {

  // single plugin
  nuxtPushPlugins(this, require.resolve('./plugin'))

  // plugin object
  nuxtPushPlugins(this, {
    src: require.resolve('./plugin'),
    mode: 'client',
  })

  // multiple plugins
  nuxtPushPlugins(this,
    require.resolve('./plugin'),
    { src: require.resolve('./plugin'), mode: 'client' },
  )
}

Contribute

Are you missing something or want to contribute? Feel free to file an issue or a pull request! ⚙️

Support

Hey, I am Sebastian Landwehr, a freelance web developer, and I love developing web apps and open source packages. If you want to support me so that I can keep packages up to date and build more helpful tools, you can donate here:

Thanks a lot for your support! ❤️

License

MIT License © Sebastian Landwehr

2.1.18

1 year ago

2.1.19

1 year ago

2.1.27

1 year ago

2.1.28

1 year ago

2.1.25

1 year ago

2.1.26

1 year ago

2.1.23

1 year ago

2.1.24

1 year ago

2.1.21

1 year ago

2.1.22

1 year ago

2.1.20

1 year ago

2.1.29

1 year ago

2.1.34

12 months ago

2.1.32

1 year ago

2.1.33

1 year ago

2.1.30

1 year ago

2.1.31

1 year ago

2.1.4

1 year ago

2.1.6

1 year ago

2.1.5

1 year ago

2.1.8

1 year ago

2.1.7

1 year ago

2.1.9

1 year ago

2.1.16

1 year ago

2.1.17

1 year ago

2.1.14

1 year ago

2.1.15

1 year ago

2.1.12

1 year ago

2.1.13

1 year ago

2.1.10

1 year ago

2.1.11

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.3

1 year ago

2.0.11

2 years ago

2.0.10

2 years ago

2.1.0

1 year ago

2.0.9

2 years ago

2.0.8

2 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

1.0.19

3 years ago

2.0.2

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.20

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago