Laravel Mix v6 extension that makes HMR work with Laravel Valet certificates.
Note: This extension assumes you already have your project linked and secured in Valet.
Install the extension:
npm install laravel-mix-valet --save-dev
Next require the extension in your webpack.mix.js
and call valet()
:
const mix = require('laravel-mix');
require('laravel-mix-valet');
mix.js('resources/js/app.js', 'public/js')
.valet();
Alternatively, you can pass a config object instead, which will be merged with the defaults below:
const mix = require('laravel-mix');
require('laravel-mix-valet');
mix.js('resources/js/app.js', 'public/js')
.valet({
host: 'othersite.test',
port: 12345,
});
Option | Default |
---|---|
host | Hostname from APP_URL |
port | 8080 |
https | true |