Elder.js: Browser Reload
Designed to work with the Elder.js Template and integrate browser reloading.
It works by adding a websocket on bootstrap. It then sets up a listener to that websocket on the client.
When the server is restarted due to a code change, the browser will restart as well.
Install
npm install --save @elderjs/browser-reload
Config
Once installed, open your elder.config.js
and configure the plugin by adding @elderjs/browser-reload
to your plugin object.
plugins: {
'@elderjs/browser-reload': {}
}
Customizing the Defaults
Below are the default settings of the plugin. You can adjust them to your needs.
plugins: {
'@elderjs/browser-reload': {
port: 8080,
delay: 200,
preventReloadQS: 'noreload',
retryCount: 50,
},
}