Browsersync can be configured to either accept a custom cert (self-signed certs using a custom CA), or skip cert checks completely, this may be helpful: https://browsersync.io/docs/options#option-https
I’ve had to tweak this for Bud in Sage v10.0.0. Hopefully helpful to anyone looking to enable SSL in dev with Valet or customise their browserSync config:
// bud.confg.ts
const browserSync = require('browser-sync-webpack-plugin');
const domain = 'example.test';
//...
/**
* Target URL to be proxied by the dev server.
*
* This is your local dev server.
*/
// .proxy(`https://${domain}`)
.use({
name: 'browser-sync-webpack-plugin',
make: () => new browserSync({
proxy: `https://${domain}`,
host: domain,
open: 'external',
https: {
key: `${process.env.HOME}/.config/valet/Certificates/${domain}.key`,
cert: `${process.env.HOME}/.config/valet/Certificates/${domain}.crt`,
},
}),
});
/**
* Development URL
*/
// .serve(`https://${domain}:3000`);
The only weird thing is it starts up on port 3001 as though it’s running another instance of browserSync? If anyone (@kellymears ) has a better way to achieve this it’d be very much appreciated!