vue-snotify
vue-snotify copied to clipboard
Possible memory leak on SSR / server side
First off, thanks for this super awesome plugin!
That being said, I think I just discovered a memory leak when using snotify with SSR. This can be mitigated by only installing the plugin on the client side (which probably makes sense anyway). I haven't found the root cause of this leak, but by not installing (Vue.use()) this plugin server-side solved the leak. For anyone wondering how to do this: make sure you know if you are rendering client or server side eg. in webpack.client.config:
plugins: [
new webpack.DefinePlugin({
'process.BROWSER_BUILD': true,
})
]
Next only use the plugin if this variable is true
if (process.BROWSER_BUILD) {
Vue.use(Snotify)
}
I think that needs to be added to the readme.