vue-flash-message icon indicating copy to clipboard operation
vue-flash-message copied to clipboard

Vue 2 flash message not working after production build

Open vinodsnayvik opened this issue 3 years ago • 2 comments

I have created an application in vue 2. I used this package for showing flash messages in the application. Without build it is working fine but after build when i run it then this is saying

 Cannot read properties of undefined (reading 'success')

I am using it like this :

this.flashMessage.success({ message: 'Settings have been updated.' });

and here is my main.js file

import Vue from 'vue'
import App from './App.vue'

import FlashMessage from "@smartweb/vue-flash-message";
Vue.use(FlashMessage);

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
}).$mount('#app')

vinodsnayvik avatar Nov 30 '22 10:11 vinodsnayvik

Hi @vinodsnayvik! Thank you for your report.

I Install version v0.6.10 of this package and vue ^2.6.11. I builded an app, but i can't reproduce your problem. Maybe you can provide more information?

Ran builded app locally in browser

smwbtech avatar Nov 30 '22 13:11 smwbtech

Hi @smwbtech ! Did you check this at production build? I have the same problem with same version and vue ^ 2.7.10. Building by vite. Can you give to us your app.js conent with this package?

seriy825 avatar Jan 04 '23 22:01 seriy825