@byu-oit/nuxt-axios-backoff
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Setup

Install

Install with yarn:

yarn add @byu-oit/nuxt-axios-backoff

Install with npm:

npm install @byu-oit/nuxt-axios-backoff

nuxt.config.js

module.exports = {
    modules: [
        '@nuxt/axios',
        '@byu-oit/nuxt-axios-backoff',
    ],
}

Typescript

Add the types to your "types" array in tsconfig.json after the @nuxt/types (Nuxt 2.12.0+)

tsconfig.json

{
  "compilerOptions": {
    "types": [
      "@nuxt/types",
      "@nuxtjs/axios",
      "@byu-oit/nuxt-axios-backoff"
    ]
  }
}

Why?

Because of the way nuxt works the $axios property on the context has to be merged into the nuxt Context interface via declaration merging. Adding @byu-oit/nuxt-axios-backoff to your types will import the types from the package and make typescript aware of the additions to the Context interface.

Usage

TODO

Package Sidebar

Install

npm i @byu-oit/nuxt-axios-backoff

Weekly Downloads

1

Version

1.0.1

License

Apache-2.0

Unpacked Size

6.71 kB

Total Files

8

Last publish

Collaborators

  • gholl0
  • mjweather
  • yoshutch
  • lehinpm
  • oscea
  • stuft2
  • mhailstone
  • arasmus8
  • garygsc
  • martingarn
  • snelg
  • byu-oit-bot