Laravel 5.7热模块更换不起作用

时间:2019-01-24 19:50:38

标签: laravel-5.7 hot-module-replacement

Laravel 5.6无法替换热模块。 此方法不起作用 https://laracasts.com/discuss/channels/laravel/laravel-mix-and-browsersync 加载http://localhost:3000,但不起作用,也没有错误

const mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.options({
    hmrOptions: {
        host: '192.168.56.2',
        port: 8080
    }
});

mix.browserSync()

mix.js('resources/js/app.js', 'public/js')
   .sass('resources/sass/app.scss', 'public/css');

0 个答案:

没有答案