liuweiGL / vite-plugin-mkcert

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

Add certPath #56

Closed n8sabes closed 1 year ago

n8sabes commented 1 year ago

Adding a certPath would allow monorepos to share certs.

Not all projects use vite-plugin-mkcert but is desirable to use the same cert.

liuweiGL commented 1 year ago

I don't understand your intention, but if you already have a certificate, you don't need to use this plugin

n8sabes commented 1 year ago

This plugin is highly valuable for ease of use for most developers.

For monorepos with multiple front-end projects and/or shared backend api / auth server, all should use the same cert in the specified secure directory. It would be nice to specify the target directory where the cert should be created and loaded from.

liuweiGL commented 1 year ago

The target directory is a constant, you can use it directly. If this doesn't satisfy you, you can submit a pr or wait for me to be free https://github.com/liuweiGL/vite-plugin-mkcert/blob/d49474d1595f52e7778df55c68c7ed4344fb5afc/plugin/lib/constant.ts#L8

n8sabes commented 1 year ago

Thank you @liuweiGL.

I coded certs manually for my monorepo this time, so there is no rush on this feature. vite-plugin-mkcert offers a lot of value for getting a project up quickly, and this would make it more useful.

If okay with you, I will leave this Issue open until the feature is added (by you or me).

🙏

liuweiGL commented 1 year ago

:tada: This issue has been resolved in version 1.11.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: