vue-simple-alert icon indicating copy to clipboard operation
vue-simple-alert copied to clipboard

vue-simple-alert does not work in Nuxt.js

Open Aravinda93 opened this issue 1 year ago • 0 comments

I am trying to add the vue-simple-alert package to my Nuxt.js application but it's not working at all. I have followed below steps:

  1. Install and add the package to my package.json via command npm install vue-simple-alert --save.
  2. Add a file alert.js under the folder plugins within my nuxt.js project and add following code:
import Vue from 'vue'
import alertifyjs from 'alertifyjs'

Vue.use(alertifyjs)
  1. Add the following lines within nuxt.config.js:
plugins: [
    { src: "~/plugins/alert", ssr: false }
  ],

Then within my pages/text.vue I added the alert message as per documentation:

this.$alert("Hello Vue Simple Alert.");

The message is displayed as a paragraph text on the Vue page rather than alert message.

enter image description here

I am not understanding whats wrong because I have used other packages similarly and everything worked well with them but same approach does not work for vue-simple-alert.

Reference documentation: https://www.npmjs.com/package/vue-simple-alert

Aravinda93 avatar Sep 26 '22 08:09 Aravinda93