Skip to content

Commit

Permalink
Simplify Mix Browsersync API
Browse files Browse the repository at this point in the history
Since upstream changes were merged which make the default files to watch
use the publicPath (laravel-mix/laravel-mix#2091). One caveat is that
those the default files to watch doesn’t include `config/*.php`, but the
impact for us would be low since those files probably wouldn’t be
changing a ton. It could be something we make another upstream PR for
since it could be beneficial to the Laravel community as well.
  • Loading branch information
knowler committed May 31, 2019
1 parent ea60923 commit 47e78b4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,7 @@ const src = path => `resources/assets/${path}`;
mix.setPublicPath('./dist');

// Browsersync
mix.browserSync({
proxy: 'https://example.test',
files: [
'(app|config|resources)/**/*.php',
publicPath`(styles|scripts)/**/*.(css|js)`,
],
});
mix.browserSync('example.test');

// Styles
mix.sass(src`styles/app.scss`, 'styles');
Expand Down

0 comments on commit 47e78b4

Please sign in to comment.