{"id":13517240,"url":"https://github.com/statianzo/webpack-livereload-plugin","last_synced_at":"2025-05-16T11:05:23.901Z","repository":{"id":1206460,"uuid":"41393191","full_name":"statianzo/webpack-livereload-plugin","owner":"statianzo","description":"LiveReload during webpack --watch","archived":false,"fork":false,"pushed_at":"2023-04-16T17:47:00.000Z","size":647,"stargazers_count":202,"open_issues_count":18,"forks_count":51,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-09T06:08:23.396Z","etag":null,"topics":["hacktoberfest","livereload","webpack","webpack-livereload-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/statianzo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-08-25T23:30:53.000Z","updated_at":"2025-04-02T07:33:04.000Z","dependencies_parsed_at":"2022-08-06T10:15:42.884Z","dependency_job_id":"f52a8fb9-f077-42e7-887b-ea35e8ad759d","html_url":"https://github.com/statianzo/webpack-livereload-plugin","commit_stats":{"total_commits":91,"total_committers":26,"mean_commits":3.5,"dds":0.5934065934065934,"last_synced_commit":"3564022b6a0b028984153269727a52995962e8a4"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statianzo%2Fwebpack-livereload-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statianzo%2Fwebpack-livereload-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statianzo%2Fwebpack-livereload-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statianzo%2Fwebpack-livereload-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statianzo","download_url":"https://codeload.github.com/statianzo/webpack-livereload-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253879342,"owners_count":21977964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","livereload","webpack","webpack-livereload-plugin"],"created_at":"2024-08-01T05:01:31.538Z","updated_at":"2025-05-16T11:05:18.886Z","avatar_url":"https://github.com/statianzo.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# webpack-livereload-plugin\n\n[![CI][ci]][ci-url]\n[![node][node]][node-url]\n\nLiveReload when running `webpack --watch`\n\n## Installation\n\nInstall the package\n\n```sh\nnpm install --save-dev webpack-livereload-plugin\n```\n\nAdd the plugin to your webpack config\n\n```js\n// webpack.config.js\n\nvar LiveReloadPlugin = require('webpack-livereload-plugin');\n\nmodule.exports = {\n  plugins: [\n    new LiveReloadPlugin(options)\n  ]\n}\n```\n\nAdd a script tag to your page pointed at the livereload server\n\n```html\n\u003cscript src=\"http://localhost:35729/livereload.js\"\u003e\u003c/script\u003e\n```\n\n\n## Options\n\n- `protocol` - (Default: protocol of the page, either `http` or `https`) Protocol for livereload `\u003cscript\u003e` src attribute value\n- `port` - (Default: 35729) The desired port for the livereload server. If you define port 0, an available port will be searched for, starting from 35729.\n- `hostname` - (Default: hostname of the page, like `localhost` or `10.0.2.2`) The desired hostname for the appended\n               `\u003cscript\u003e` (if present) to point to\n- `appendScriptTag` - (Default: false) Append livereload `\u003cscript\u003e`\n                   automatically to `\u003chead\u003e`.\n- `ignore` - (Default: `null`) RegExp of files to ignore. Null value means\n  ignore nothing. It is also possible to define an array and use multiple [anymatch](https://github.com/micromatch/anymatch) patterns.\n- `delay` - (Default: `0`) amount of milliseconds by which to delay the live reload (in case build takes longer)\n- `useSourceHash` - (Default: `false`) create hash for each file source and only notify livereload if hash has changed\n- `useSourceSize` - (Default: `false`) check size for each file source and only notify livereload if size has changed (Faster than `useSourceHash` but it has a downside. If file size hasn't changed no reload is triggered. For example if color has changed from `#000000` to `#ffffff` no reload will be triggered!)\n\n## Why?\n\nYes, there's already `webpack-dev-server` that handles live reloading\nand more complex scenarios. This project aims to solve the case where\nyou want assets served by your app server, but still want reloads\ntriggered from webpack's build pipeline.\n\n## HTTPS\n\nIf you set `key`, `cert`, or `pfx` options, they'll get passed through to\n[tiny-lr as options](https://github.com/mklabs/tiny-lr#options) and it will\nserve over HTTPS. You'll also also set `protocol` to `https`.\n\n## FAQ\n\n##### Webpack always generates js and css together\n\nIf your webpack is always generating js and css files together you could set \n`useSourceHash` to `true` to generate a hash for each changed asset and it \nshould prevent multiple reloads. \n\nAlternatively if this slows your build process you could set `liveCSS` \nand `liveImg` to `false` to prevent multiple reloads.\n\n\n[node]: https://img.shields.io/node/v/webpack-livereload-plugin.svg\n[node-url]: https://nodejs.org\n[ci]: https://github.com/statianzo/webpack-livereload-plugin/actions/workflows/ci.yml/badge.svg?branch=master\n[ci-url]: https://github.com/statianzo/webpack-livereload-plugin/actions/workflows/ci.yml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatianzo%2Fwebpack-livereload-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatianzo%2Fwebpack-livereload-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatianzo%2Fwebpack-livereload-plugin/lists"}