Laravel project auto refresh after changes

前端 未结 2 611
渐次进展
渐次进展 2021-01-03 06:34

Does anyone know if there is a way to run the code changes in a Laravel project without refreshing the page every time.

I know that to see the chang

2条回答
  •  悲&欢浪女
    2021-01-03 07:02

    add in webpack.max.js file in laravel

    mix.browserSync('127.0.0.1:8000');
    

    then run this command

    > npm install browser-sync browser-sync-webpack-plugin@2.0.1 --save-dev --production=false
    

    after this run npm run watch

    > Browsersync automatic run your port 3000
    

提交回复
热议问题