我目前正在使用Laravel Elixir,我遇到BrowserSync问题。当我将代理更改为我的域时,无论如何,它仍然使用 http://homestead.app 。这是我的代码:
elixir(mix => {
mix
.sass('resources/sass/*.*', 'public/css/style.css' )
.scripts('resources/js/*.*', 'public/js/main.js')
.browserSync([
'public/css/**/*'
], {
proxy: 'dev.mydomain.com'
});
});
这是终端的结果
[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...
正如您所看到的,它仍然代表在homestead.app 知道如何解决这个问题吗?
答案 0 :(得分:1)
尝试将其更改为:
browserSync({
proxy: 'dev.mydomain.com',
files: [
'public/css/**/*'
],
});