`vue-browserupdate` is a Vue.js wrapper for the popular `browser-update.org` JavaScript library, designed to streamline the integration of browser version checking and update prompting into Vue applications. It provides a straightforward API to initialize the underlying `browser-update` script and exposes its core events—`onshow`, `onclick`, and `onclose`—as Vue-compatible functions. The current stable version, 1.2.0, indicates a mature wrapper for Vue 2 applications. Its release cadence typically follows updates to the core `browser-update` library or significant changes within the Vue.js ecosystem. The package's primary differentiator is its simplicity in encapsulating the browser update notification logic within a standard Vue plugin pattern, minimizing boilerplate for developers.
npm install vue-browserupdateVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install `vue-browserupdate` as a Vue plugin, pass custom options to the underlying `browser-update` library, enable test mode, and attach event listeners to the browser update prompt.
Remove `test: true` or set it to `false` in production build configurations.
Ensure all `browser-update.org` specific configurations are nested under the `options` property when calling `Vue.use()`.
For Vue 3, consider using a different `browser-update` integration or creating a custom plugin that adapts this wrapper's logic to Vue 3's `app.use()` and `app.config.globalProperties`.
Ensure `import Vue from 'vue';` is present and that `Vue.use(VueBrowserUpdate)` is called after Vue itself is properly loaded and initialized.
Verify that `Vue.use(VueBrowserUpdate)` is called before any attempts to access `Vue.browserUpdate.onshow`, `onclick`, or `onclose`.