i just tried to get a localhost certificate to work on my setup-
and after some try and error i got this to work:
using minica to generate a cert:
create folder .certs
in your project root
mkdir .certs
navigating inside
yourProject $ cd .certs
yourProject/.certs $
create a cert:
yourProject/.certs $ minica -domain localhost
import the root ca minica.pem
in firefox or your default browsers..
then add in your quasar.conf
// ....
const fs = require("fs");
// ....
module.exports = configure(function (/* ctx */) {
return {
// ....
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
devServer: {
open: false, // opens browser window automatically
// https: true, // for automagically self-signed cert.
https: {
key: path.join(__dirname, ".certs/localhost/key.pem"),
cert: path.join(__dirname, ".certs/localhost/cert.pem"),
},
},
// ....
});
and that indeed works 🙂
sadly if you are search the web you first will land at
https://quasar.dev/quasar-cli-webpack/quasar-config-file#devserver
(scroll down a bit)
as there is an example of the webpack config.
and in the vite doc there is currently none for this setup..