PHPackages                             jeanmarcos/module-livereload - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jeanmarcos/module-livereload

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

jeanmarcos/module-livereload
============================

Magento 2 development module that injects the LiveReload browser auto-reload script into storefront and admin pages. For local development only — guarded against production mode.

1.1.0(2mo ago)001MITPHPPHP ~8.1.0||~8.2.0||~8.3.0

Since Apr 27Pushed 2mo agoCompare

[ Source](https://github.com/jeanmarcos-dev/module-livereload)[ Packagist](https://packagist.org/packages/jeanmarcos/module-livereload)[ RSS](/packages/jeanmarcos-module-livereload/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (5)Versions (3)Used By (1)

> 📦 **`jeanmarcos/module-livereload`** — published to [Packagist](https://packagist.org/packages/jeanmarcos/module-livereload).
>
> 🏠 **Source repository** for issues, PRs and releases: **[jeanmarcos-dev/magento-local-development](https://github.com/jeanmarcos-dev/magento-local-development)**. The standalone [`jeanmarcos-dev/module-livereload`](https://github.com/jeanmarcos-dev/module-livereload) repo is a **read-only mirror** auto-generated by CI on every release — direct commits to it are overwritten.

Development\_LiveReload
=======================

[](#development_livereload)

[![Packagist](https://camo.githubusercontent.com/6c6781db0cf7ab97741681b2749cd4a500a9d2dde79b4129bb621e63113064e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a65616e6d6172636f732f6d6f64756c652d6c69766572656c6f61642e737667)](https://packagist.org/packages/jeanmarcos/module-livereload)

> ⚠️ **FOR LOCAL DEVELOPMENT ONLY** — Production injection is disabled by default.

Injects the [LiveReload](http://livereload.com/) browser auto-reload script into Magento 2 storefront and admin pages, so code changes refresh the browser without manual `F5`.

---

What it does
------------

[](#what-it-does)

Injects the following tag just before `` on every storefront and admin page:

```

```

The script is rendered by `Development\LiveReload\Block\Head\LiveReloadScript`, which reads the production guard before rendering.

A local LiveReload server (e.g. `npx livereload ./pub`) must serve `/livereload.js` for the browser to connect.

---

Safety model
------------

[](#safety-model)

Mode`Allow in Production` flagBehavior`developer` / `default`any**script injected**`production``No` (default)**not injected**`production``Yes`**script injected**Implementation: [`Development_Core`](https://packagist.org/packages/jeanmarcos/module-core-local-development) (`Development\Core\Model\ProductionGuard::isEnabled()`), wired via a `virtualType` in `etc/di.xml` bound to the config path `development/live_reload/allow_in_production`, plus `Block\Head\LiveReloadScript::_toHtml()` — when disabled, returns an empty string so nothing reaches the page.

The block's `getCacheKeyInfo()` includes the flag, so layout/block cache stays consistent across toggles without needing a full cache flush.

---

Configuration
-------------

[](#configuration)

Panel path: **Stores → Configuration → ⚠ Development Modules → Live Reload → General → Allow in Production**

- Default: `No`.
- Changing the flag requires `bin/magento cache:clean config layout block_html`.

---

Install
-------

[](#install)

```
composer require --dev jeanmarcos/module-livereload
bin/magento module:enable Development_LiveReload
bin/magento setup:upgrade
bin/magento cache:flush
```

Then start a LiveReload server pointing at your theme assets:

```
# Node-based server example
npx livereload pub/static -p 443

# Or with livereload-bin
livereload ./ --port 443
```

Kill switch
-----------

[](#kill-switch)

```
bin/magento module:disable Development_LiveReload
bin/magento setup:upgrade
bin/magento cache:flush
```

For permanent removal:

```
composer remove jeanmarcos/module-livereload
```

---

Security and performance considerations
---------------------------------------

[](#security-and-performance-considerations)

- Low security impact on its own — serves only static reload JS.
- If left on in production with no LiveReload server running, every page load returns `404` on `/livereload.js`, polluting logs and breaking the page speed budget by a negligible margin.
- The script is loaded with `defer`, so it does not block rendering.

---

File structure
--------------

[](#file-structure)

```
LiveReload/
├── Block/
│   └── Head/
│       └── LiveReloadScript.php
├── etc/
│   ├── acl.xml
│   ├── adminhtml/
│   │   └── system.xml
│   ├── config.xml
│   ├── di.xml                       # block wiring + ProductionGuard virtualType
│   └── module.xml                   # depends on Development_Core
├── view/
│   ├── adminhtml/
│   │   └── layout/
│   │       └── default.xml
│   ├── base/
│   │   └── templates/
│   │       └── head/
│   │           └── livereload.phtml
│   └── frontend/
│       └── layout/
│           └── default_head_blocks.xml
├── composer.json
├── registration.php
└── README.md

```

---

Troubleshooting
---------------

[](#troubleshooting)

- **Script doesn't appear:** check `bin/magento deploy:mode:show`; if in production, check the flag; then `cache:clean layout block_html`.
- **Port mismatch:** the path `/livereload.js?port=443` is hardcoded in `view/base/templates/head/livereload.phtml`. Edit the template if your server uses a different port.
- **404 on `/livereload.js`:** LiveReload server is not running — start it or disable this module.

---

Compatibility
-------------

[](#compatibility)

- Magento 2.4.x
- PHP 8.1+
- Depends on `jeanmarcos/module-core-local-development` (installed automatically by Composer).

---

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance83

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

88d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26399111?v=4)[Jeanmarcos](/maintainers/jeanmarcos-dev)[@jeanmarcos-dev](https://github.com/jeanmarcos-dev)

---

Top Contributors

[![jeanmarcos-dev](https://avatars.githubusercontent.com/u/26399111?v=4)](https://github.com/jeanmarcos-dev "jeanmarcos-dev (2 commits)")

---

Tags

magentodevelopmentlivereloadmagento2magento 2dev-toolshot-reloadlive-reloadbrowser-reload

### Embed Badge

![Health badge](/badges/jeanmarcos-module-livereload/health.svg)

```
[![Health](https://phpackages.com/badges/jeanmarcos-module-livereload/health.svg)](https://phpackages.com/packages/jeanmarcos-module-livereload)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)[joseph-leedy/module-custom-fees

Adds configurable custom fees to orders

361.2k](/packages/joseph-leedy-module-custom-fees)[angeo/module-llms-txt

Magento 2 module for AI Engine Optimization (AEO). Generates spec-compliant llms.txt and llms-full.txt per llmstxt.org standard, plus streaming JSONL for vector indexing. Multi-store, multi-website, CLI, cron, async admin UI, Page Builder-aware sanitization, customer-group pricing, atomic writes, ETag/Cache-Control, .md mirrors.

111.1k](/packages/angeo-module-llms-txt)[zwernemann/module-withdrawal

Magento 2 EU Withdrawal Button Module - Adds a withdrawal/revocation button for orders in compliance with EU Directive (EU) 2023/2673

256.0k2](/packages/zwernemann-module-withdrawal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
