0.1.7 • Published 4 years ago

@elderjs/browser-reload v0.1.7

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

New Location:

This plugin has moved to @elderjs/plugin-browser-reload

See all of the latest plugins here at: Elder.js plugins

Legacy Docs: 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/plugin-browser-reload

Config

Once installed, open your elder.config.js and configure the plugin by adding @elderjs/plugin-browser-reload to your plugin object.

plugins: {
  '@elderjs/plugin-browser-reload': {} // activates the plugin
}

Customizing the Defaults

Below are the default settings of the plugin. You can adjust them to your needs.

plugins: {

  '@elderjs/plugin-browser-reload': {
    port: 8080, // the port the websocket server should run on.
    delay: 200, // the delay in ms the browser should wait after the server disappears.
    preventReloadQS: 'noreload', // if 'noreload' is in the query string it won't reload that page. Good for CSS editing in the browser.
    retryCount: 50, // number of tries the browser will check to see if the server is up before giving up.
  },

}
0.1.7

4 years ago

0.1.6

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago