Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@elderjs/browser-reload

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elderjs/browser-reload

Reload your browser when your Elder.js server restarts.

  • 0.1.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-87.5%
Maintainers
2
Weekly downloads
 
Created
Source

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.
  },

}

Keywords

FAQs

Package last updated on 18 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc