S
SolidJS5mo ago
Luka

Vite Certificate

I just ran into problem while creating certificate for localhost, using vite I changed app.config.js the code below is my configuration import { defineConfig } from "@solidjs/start/config"; import mkcert from "vite-plugin-mkcert"; export default defineConfig({ ssr: true, vite: { server: { https: true }, plugins: [ mkcert({ force: true, savePath: "./cert", }), ], }, server: { https: { cert: "./cert/cert.pem", key: "./cert/dev.pem" }, }, }) I expect it to create valid certificate but browsers warn that its certificate is not valid.
1 Reply
Grahf
Grahf5mo ago
In the past I installed: npm install -D @vitejs/plugin-basic-ssl Then you can import this: import basicSsl from '@vitejs/plugin-basic-ssl' And use it like this:

vite: {

plugins: [basicSsl()],

server: {

https: true,

},

},

vite: {

plugins: [basicSsl()],

server: {

https: true,

},

},
Want results from more Discord servers?
Add your server