liuweiGL / vite-plugin-mkcert

Provide certificates for vite's https dev service.
https://www.npmjs.com/package/vite-plugin-mkcert
MIT License
587 stars 38 forks source link

Generate certificates from command line #94

Closed Shujee closed 1 week ago

Shujee commented 1 week ago

Is there a way to use this plug-in from command-line? I don't want to run Vite server or do yarn dev etc. I just want those certificates to be generated in respective locations (/root/.vite-plugin-mkcert/rootCA.pem etc.). I need to do this from inside a script (.sh).

liuweiGL commented 1 week ago

Just use the https://github.com/FiloSottile/mkcert

Shujee commented 1 week ago

right, but how do I use those supply those certificates to this plug-in? If I generate them using mkcert and place them in /root/.vite-plugin-mkcert/rootCA.pem, will the plugin use those instead of generating new ones when I run dev server?

Also which of the 3 pem files (rootCA.pem, cert.pem and dev.pem) are needed to be generated?

liuweiGL commented 1 week ago

This plug-in is for vite-server service, if you don't need vite-server why provide external certificate for the plug-in