A Volto add-on that notifies users to reload the browser window if a new version of the frontend has been deployed.
- Adds an Express middleware to serve the frontend version at
/__frontend-version. - Includes a React component (
UpdateNotifier) that polls the version endpoint. - Displays a "Reload window" button when a version change is detected.
-
Install the package:
yarn add @eeacms/volto-updatenotifier
-
Add the add-on to your
volto.config.js:const addons = ['@eeacms/volto-updatenotifier'];
The add-on registers an Express middleware that serves the version from the project's package.json at the /__frontend-version endpoint.
The UpdateNotifier component is automatically added to appExtras. It polls the /__frontend-version endpoint at a regular interval to determine if a new version has been deployed.
When the component detects a version change compared to the initial version loaded at startup, it renders a "Reload window" button, prompting the user to refresh the page to get the latest updates.
The Initial Owner of the Original Code is European Environment Agency (EEA). All Rights Reserved.
See LICENSE.md for details.