🍣 A Rollup plugin which adds the LiveReload client for use during development
npm install --save-dev rollup-plugin-livereload-client
This plugin is meant to be used with plugins that output html, like @rollup/plugin-html.
// rollup.config.js;;const development = processenvROLLUP_WATCH;entry: "entry.js"output:dir: "build"plugins:;
index.html will be modified to include a script tag to load
livereload.js. Which will also be copied into the
Specifies whether to include the client. When
livereload.js is copied into the
output.dir and a
<script> tag to load
livereload.js is injected into
index.html. Set to
false in production so
livereload is not included in the build.
Specifies the port number that the separate livereload server is running on.
Please see CHANGELOG for more information what has changed recently.
Contributions and feedback are very welcome.
To get it running:
- Clone the project.
npm run build
This plugin is similar to rollup-plugin-livereload by Thomas Ghysels. The main difference being, this is the client only. I needed this to integrate with the LiveReload server already running in Spring Boot.
The MIT License (MIT). Please see License File for more information.