Gathering detailed insights and metrics for rollup-plugin-livereload-universal
Gathering detailed insights and metrics for rollup-plugin-livereload-universal
Gathering detailed insights and metrics for rollup-plugin-livereload-universal
Gathering detailed insights and metrics for rollup-plugin-livereload-universal
Rollup plugin that allows reloading user's page by manually emitting events.
npm install rollup-plugin-livereload-universal
Typescript
Module System
Node Version
NPM Version
TypeScript (62.49%)
JavaScript (37.51%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2 Commits
1 Forks
1 Watchers
15 Branches
1 Contributors
Updated on Jun 06, 2020
Latest Version
1.0.0
Package Id
rollup-plugin-livereload-universal@1.0.0
Unpacked Size
29.64 kB
Size
7.03 kB
File Count
11
NPM Version
6.13.7
Node Version
13.9.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
22
This plugin allows manually triggering reload of the user's page via LiveReload WS connection. This plugin was conceived as a supplement for rollup-plugin-memory-fs, since it is the only way to provide live reloading while using that plugin. However, as the name implies, it's universal.
This plugin is heavily inspired by and partly taken from rollup-plugin-livereload, so big kudos to Thomas Ghysels for that plugin. If you're not using rollup-plugin-memory-fs, there's a high probability his plugin will work for you just fine.
# yarn
yarn add -D rollup-plugin-livereload-universal
# npm
npm install --save-dev rollup-plugin-livereload-universal
1// rollup.config.js 2import serve from 'rollup-plugin-serve'; 3import memfs from 'rollup-plugin-memory-fs' 4import livereload from 'rollup-plugin-livereload-universal' 5 6const memfsPlugin = memfs(); 7const livereloadPlugin = livereload({ reloadEmitter: memfsPlugin }); 8 9export default { 10 input: 'src/main.js', 11 output: { 12 file: 'dist/bundle.js', 13 format: ... 14 }, 15 plugins: [ 16 serve({ contentBase: ['./dist'] }), 17 memfsPlugin, 18 livereloadPlugin, 19 ] 20}
Option | Type | Required | Default | Description |
---|---|---|---|---|
reloadEmitter | ReloadEmitter | true | undefined | EventEmitter that emits reload event for reloading user's page. |
verbosity | "silent" | "startup" | "debug" Verbosity | false | "startup" | Level of output verbosity. |
watch | string | false | undefined | A single path or an array of paths that should be watched for changes for reloading the user's page. Accepts both directories and specific files. If not specified, any reload event will cause page refresh.If relative path is specified, it's resolved relative to Rollup output directory (or directory in which output.file resides; each output is checked). |
port | number | false | 35729 | Port that LiveReload WS server will listen to. |
clientUrl | string | false | undefined | URL of a custom client JS script that's supposed to connect to LiveReload WS server. |
If you're writing your own emitter (as opposed to using, for example, rollup-plugin-memory-fs), note that you should emit reload
event for each file that caused the reload (in case there were several files), so that handler can respect the watch
parameter accurately. All emissions of reload
events are buffered for the next iteration of Node.js event loop, so it's fine to emit several events simultaneously.
Please see CHANGELOG for more information what has changed recently.
Contributions and feedback are more than welcome.
To get it running:
npm install
;npm run build
.The MIT License (MIT). Please see LICENSE for more information.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/2 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
32 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More