Download the PHP package jeanmarcos/module-livereload without Composer
On this page you can find all versions of the php package jeanmarcos/module-livereload. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jeanmarcos/module-livereload
More information about jeanmarcos/module-livereload
Files in jeanmarcos/module-livereload
Package module-livereload
Short Description 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.
License MIT
Informations about the package module-livereload
📦
jeanmarcos/module-livereload— published to Packagist.🏠 Source repository for issues, PRs and releases: jeanmarcos-dev/magento-local-development. The standalone
jeanmarcos-dev/module-livereloadrepo is a read-only mirror auto-generated by CI on every release — direct commits to it are overwritten.
Development_LiveReload
⚠️ FOR LOCAL DEVELOPMENT ONLY — Production injection is disabled by default.
Injects the LiveReload browser auto-reload script into Magento 2 storefront and admin pages, so code changes refresh the browser without manual F5.
What it does
Injects the following tag just before </body> 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
| Mode | Allow in Production flag |
Behavior |
|---|---|---|
developer / default |
any | script injected |
production |
No (default) |
not injected |
production |
Yes |
script injected |
Implementation: Development_Core (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
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
Then start a LiveReload server pointing at your theme assets:
Kill switch
For permanent removal:
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
404on/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
Troubleshooting
- Script doesn't appear: check
bin/magento deploy:mode:show; if in production, check the flag; thencache:clean layout block_html. - Port mismatch: the path
/livereload.js?port=443is hardcoded inview/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
- Magento 2.4.x
- PHP 8.1+
- Depends on
jeanmarcos/module-core-local-development(installed automatically by Composer).
License
MIT
All versions of module-livereload with dependencies
magento/framework Version >=103.0
magento/module-theme Version *
magento/module-backend Version *
magento/module-config Version *
jeanmarcos/module-core-local-development Version ^1.0