Homestead + BrowserSync doesn't watch view files
See original GitHub issue- Laravel Mix Version: 1.0.7
- Node Version: 8.1.2
- NPM Version: 5.0.3
- OS: Win10 + Homestead
Description:
When using the command “npm run watch” or “npm run watch-poll” to update view files, the screen is not reloaded. However for CSS it works normally. This running with Homestead. However, if the commands are executed via Windows10, the view files update normally. I’m not using Windows directly because I use browsersync with other devices on the network, and only via homestead I can do this.
my config (I already tried several paths … I left what works on Windows):
// Configs
let config = {
host: '192.168.1.80',
port: 3000,
base_url: 'admin.dev',
watchFiles: [
'app/Modules/**/Resources/views/**/*.{php,html}',
'app/Modules/**/Resources/views/*.{php,html}',
//'app/**/*.*',
//'public/**/*.*',
//'resources/assets/**/*.*',
//'resources/views/**/*.*',
//'app/Modules/**/Resources/views/**/*.*',
//'public/css/**/*.*',
//'public/js/**/*.*',
//'resources/views/**/*.*',
//'aap/Modules/**/Resources/views/**/*.*',
//'app/Modules/**/Resources/views/*.*'
]
};
//Browserfy
mix.browserSync({
files: config.watchFiles,
host: config.host,
proxy: config.base_url,
port: config.port,
online: true,
logConnections: false,
reloadOnRestart: true,
notify: false,
open: false //false, local, external, ui, tunnel
});
Steps To Reproduce:
- Access Homestead via ssh
- Access Project Folder
- Run “npm run watch-poll”
- Change some view file
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Homestead + BrowserSync doesn't watch view files · Issue #950
When using the command "npm run watch" or "npm run watch-poll" to update view files, the screen is not reloaded. However for CSS...
Read more >Laravel Homestead with BrowserSync - Stack Overflow
My app is homestead.app. So, after starting gulp watch, I go to homestead.app:3000 and see my app without BrowserSync. I go to homestead.app: ......
Read more >How to configure Browser Sync live reloading in your ... - Teklog
Head over to your IDE editor, change something in your Blade template, Javascript or CSS files and save it. Make sure it's also...
Read more >Homestead and Browsersync (gulp file) - Laracasts
Hi, I'm trying to integrate BrowserSync into my gulp file, but for the time being it doesn't seem to be working inside the...
Read more >One Setup to Rule Them All: Vagrant + Laravel Mix + ...
Browsersync will watch those files for changes and reload the browser. So this should be an array of compiled files and templates.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same thing here.
Laravel Mix: 1.4.2 Node: 6.11.1 NPM: 3.10.10 OS: Linux (Elementary OS Loki) + Homestead (3.0)
Even with default configuration.
UPDATE A working example.
source: https://github.com/JeffreyWay/laravel-mix/issues/780#issuecomment-299685750
Excelente solución. Muchas gracias.