Plugin that reloads the page on every build.
npm install --save-dev esbuild-reloader
# or
yarn add -D esbuild-reloader
This assumes watch
mode and does nothing for regular builds:
const reloader = require('esbuild-reloader');
esbuild.build({
// ...
watch: true,
// ...
plugins: [
// ...
reloader(),
],
});
{
host: String, // default 'localhost'
port: Number, // default 8001
reconnectTimeout: Number, // default 5000
retries: Number | 'always', // default 10
}