valet本地域,浏览器同步Laravel mix

时间:2017-10-30 13:23:53

标签: laravel npm mix laravel-valet

我有加载laravel项目,可以使用代客域 something.dev

运行良好

尝试使用laravel-mix

实现浏览器同步
mix.browserSync({
    proxy: 'something.dev'
});

运行npm run watch后,它指向http://localhost:3000/

我能指向valet域而不是localhost:3000吗?

以下是npm run watch

的输出
Asset     Size  Chunks             Chunk Names
mix.js  2.59 kB       0  [emitted]  mix
[Browsersync] Proxying: http://something.dev
[Browsersync] Access URLs:
 --------------------------------------
       Local: http://localhost:3000
    External: http://192.168.1.131:3000
 --------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.1.131:3001
 --------------------------------------
[Browsersync] Watching files...

1 个答案:

答案 0 :(得分:6)

我自己也有类似的问题让browserSync与Valet合作,但我使用的选项是:

        ----------------------------756387848644087010707938
        Content-Disposition: form-data; name=""; filename="Git.txt"
        Content-Type: text/plain






        git init

        git add .

        git commit -m "intial commit"

        git  remote add origin https://git-com.com/v1/repos/??

        git remote -v

        git push origin master

        # git remote rm origin



        --------------------
        -- Plain clone ----|
        --------------------

        git clone --recursive -j8 https://url/v1/repos/pt

        git submodule foreach --recursive git checkout feature_rockiung

        git clone -b feature_rockiung  --single-branch <url> submodule update --init --recursive
        ----------------------------756387848644087010707938--

主机会覆盖browserSync中任何主机名检测

打开告诉它打开哪个网址(默认为本地)