npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ssr-browser-reload-webpack-plugin

v0.1.1

Published

Plugins for reloading you browser on changes when using server side rendering.

Readme

ssr-browser-reload-webpack-plugin

Plugins for reloading you browser on changes when developing a server side rendered app and using Webpack as a bundler.

Important

Consider the following:

  • This is still an experimental package.
  • It's tested on localhost.
  • Currently supports only http protocol.
  • Is used in a single page application project.
  • Does not reload on changes in your index.html file.

How to install

  • In your project's folder terminal execute:
npm install --save-dev ssr-browser-reload-webpack-plugin

How to use

  • Require the plugins:
const {SSRReloadClientPlugin, SSRReloadServerPlugin} = require('ssr-browser-reload-webpack-plugin');
  • Add an instance of the SSRReloadClientPlugin to your webpack config for the client bundle and provide all parameters to the constructor.
  • Add an instance of the SSRReloadServer Plugin to your webpack config for the server bundle and provide all parameters to the constructor.
  • Build your code, start your ssr-server and open your app in the browser, then the browser will reload after changes in your JavaScript or style files.

How it works

Under the hood in webpack development mode the SSRReloadClientPlugin starts a server that will send Server Sent Events to your app which should reload after a defined timeout. For this purpose the plugin also adds some code to the index.html of your project. This logic is used to make connection to the server, listen to the messages sent by the server and reload when needed. The SSRReloadServerPlugin is needed in order to notify the reload server when the server build is ready, so that the reload to be made after the new server code is ready. To ensure that the server is up and running on reload, a certain timeout should be set.

Exported plugins

The package exports two webpack plugins: SSRReloadClientPlugin and SSRReloadServerPlugin. The first one must be used in the webpack config for the client bundle and the second one - in the server bundle config.

SSRReloadClientPlugin

In development mode add to plugins array a new instance of the plugin, by providing the following parameters to the constructor:

  • appDomain - the domain that serves your ssr app, for example http://localhost:3000
  • host - the host where the build is being made, for example 127.0.0.1
  • port - the port on the host for the reload server
  • protocol - currently supports only http
  • template - the relative path to your index.html file
  • timeout - the timeout after which the browser should reload (in milliseconds)

SSRReloadClientPlugin

In development mode add to plugins array a new instance of the plugin, by providing the following parameters to the constructor:

  • host - the host where the build is being made, for example 127.0.0.1
  • port - the port on the host for the reload server
  • protocol - currently supports only http