@byu-oit/nuxt-alerts
v1.0.5
Published
Organize alerts for displaying errors and other messages on a Nuxt client
Readme
Setup
Install
Install with yarn:
yarn add @byu-oit/nuxt-alertsInstall with npm:
npm install @byu-oit/nuxt-alertsnuxt.config.js
module.exports = {
modules: [
'@byu-oit/nuxt-alerts',
],
}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",
"@byu-oit/nuxt-alerts"
]
}
}Why?
Because of the way nuxt works the
$axiosproperty on the context has to be merged into the nuxtContextinterface via declaration merging. Adding@byu-oit/nuxt-alertsto your types will import the types from the package and make typescript aware of the additions to theContextinterface.
Usage
TODO
