As per the title, running yarn build start but browser sync is not updating when I’m saving blade files in resources/views or php files in my app folder. Javascript file changes and style changes seem to work fine.
My dev site is on a non-https URL, I did find and old thread where that was a possible reason. Other than than that, I’m on Mac 10.13.2, Apache/2.4.28 (Unix) PHP/7.1.7. Not sure on Sage version but it’s very recent. I only started the project in the last week or two.
I’ve cleared the cache and the problem persists however, I have noticed that it’s explicitly limited to the code that is within the logged in section. My site checks whether the user is logged in and includes partials accordingly, it’s these partials that are not triggering browser sync it seems. So this is the code on my page template:
@extends('layouts.app')
@php
namespace Bbc;
@endphp
@section('content')
@while(have_posts()) @php(the_post())
@include('partials.page-header')
@endwhile
@if(is_user_logged_in())
{{--Check that site mode is correct--}}
@if(is_site_mode(['Nominations','Voting']))
@include('partials.nominate', ['type' => 'trade-hero', 'thing' => 'trade hero'])
@else
Error: nominations are closed
@endif
@else
Error: you need to be <a href="/login/">logged in</a> to nominate. Don't have an account, <a href="/register/">register here</a>.
@endif
@endsection
So basically anything I add within the @if(is_user_logged_in()) section does not trigger browser sync it seems. Also noticed that if I make any updates just above that line, browser sync triggers but it falls through to
Error: you need to be <a href="/login/">logged in</a> to nominate. Don't have an account, <a href="/register/">register here</a>.