Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 624 Bytes

README.md

File metadata and controls

44 lines (31 loc) · 624 Bytes

esbuild-reloader

Plugin that reloads the page on every build.

Installing

npm install --save-dev esbuild-reloader

# or

yarn add -D esbuild-reloader

Configuration

This assumes watch mode and does nothing for regular builds:

const reloader = require('esbuild-reloader');

esbuild.build({
  // ...
  watch: true,
  // ...
  plugins: [
    // ...
    reloader(),
  ],
});

Options

{
  host: String,               // default 'localhost'
  port: Number,               // default 8001
  reconnectTimeout: Number,   // default 5000
  retries: Number | 'always', // default 10
}