3.0.0 • Published 4 years ago
laravel-mix-blade-reload v3.0.0
Laravel Mix Blade Reload
Laravel Mix extension to auto-reload browser when you change the blade views.
Installation
Install the extension:
npm install laravel-mix-blade-reloadOr if you prefer yarn:
yarn add laravel-mix-blade-reloadNext require the extension inside your Laravel Mix config and call bladeReload() in your pipeline:
// webpack.mix.js
const mix = require('laravel-mix');
require('laravel-mix-blade-reload');
mix.js('resources/js/app.js', 'public/js')
.bladeReload();Note
Works only when running HMR - Hot Module Replacement script (npm run hot).
Options
Default options
If nothing is passed to the extension inside your Laravel Mix config, the following options will be used:
{
path: 'resources/views/**/*.blade.php',
debug: false
}Option details
path(string or array of strings). Path to files, directories to be watched recursively, or glob patterns.debug(boolean). Whenever to log extension event messages to the console.
Changelog
New in version 2.x
- Now supports
laravel-mixversion 6
New in version 1.x
- Rewrited into TypeScript
- Option
pathswas renamed topath