Configure Vite for Herd with HTTPS
mainIf you are using Laravel Herd for your local setup, you must enable HTTPS in Vite to match your local environment. Create a /panel/vite.config.custom.js file and point it to your Herd certificates.
Note: You must replace XYZ with your local system username and ensure the paths to the .key and .crt files are correct for your operating system.
/* eslint-env node */
import fs from "fs";
module.exports = {
https: {
key: fs.readFileSync(
"/Users/XYZ/Library/Application Support/Herd/config/valet/Certificates/sandbox.test.key"
),
cert: fs.readFileSync(
"/Users/XYZ/Library/Application Support/Herd/config/valet/Certificates/sandbox.test.crt"
)
}
};