aligajani's avatar

How to make Laravel Valet work nicely with BrowserSync?

Has anyone made Laravel Valet (secure) work nicely with Browser Sync while using Laravel Mix. I am doing something like this but it keeps pointing me to https://shadow-api.test:3000 where as I simply want to omit the port.

mix.browserSync({
    proxy: 'shadow-api.test',
    host: 'shadow-api.test',
    open: 'external',
    https: {
        key: "/Users/aligajani/.config/valet/Certificates/shadow-api.test.key",
        cert: "/Users/aligajani/.config/valet/Certificates/shadow-api.test.crt"
    }
});

For your information, I am using the latest versions of everything, fresh install and intend on building a SPA (with token auth). I haven't had similar issues with BrowserSync before simply because I wasn't using Valet.

0 likes
1 reply
bugsysha's avatar

Had the same issue so I created bs-config.js and defined all there and then just run it as a separate process.

Please or to participate in this conversation.