Huy Le
Huy Le

Reputation: 389

How to change proxy in Laravel Elixir BrowserSync

I'm currently using Laravel Elixir and I have a problem with BrowserSync. When I changed the proxy into my domain, it still kept using http://homestead.app no matter what. Here is my code:

elixir(mix => {
    mix
    .sass('resources/sass/*.*', 'public/css/style.css' )
    .scripts('resources/js/*.*', 'public/js/main.js')
    .browserSync([
        'public/css/**/*'
        ], {
        proxy: 'dev.mydomain.com'
    });
});

And here is the result in the terminal

[16:57:38] Finished 'default' after 95 ms
[16:57:38] Finished 'watch' after 1.38 s
[BS] Proxying: http://homestead.app
[BS] Access URLs:
 -------------------------------------
       Local: http://localhost:3000
    External: http://192.168.56.1:3000
 -------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.56.1:3001
 -------------------------------------
[BS] Watching files...

As you can see, it's still proxying at homestead.app Any idea how to fix this issue?

Upvotes: 0

Views: 250

Answers (1)

Ryan
Ryan

Reputation: 1171

Try changing it to:

browserSync({
    proxy: 'dev.mydomain.com',
    files: [
     'public/css/**/*'
    ],
});

Upvotes: 1

Related Questions