Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for mkcert in PATH if mkcertPath not given, before attempting a download #96

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FrostKiwi
Copy link

Big fan of this plugin, a life saver, because certain browser features cannot be used without HTTPS. As someone developing for WebXR, essential for local testing.

Description

This PR makes vite-plugin-mkcert check for mkcert in PATH, if mkcertPath is not defined, before attempting the default download.

Additional context

This is to solve two things, which I encountered in an environment with a corporate firewall. vite-plugin-mkcert doesn't seem to work with with our proxy and fails the download with ERCONNRESET. Downloading manually and specifying mkcertPath works, but leads to a code portability problem if the downloaded mkcert is not part of the vite-projects's repo and an OS portability issue, if you check in the windows' mkcert, but another dev uses linux and vice-versa. Installing mkcert to PATH and relying on vite-plugin-mkcert to check PATH was the cleanest solution for me.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant