ITADN

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

#96Pull RequestFrostKiwi 创建于 2024-10-24
F
FrostKiwicommented
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. <!-- Thank you for contributing! --> ### 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? <!-- (put an "X" next to an item) --> - [ ] Bug fix - [X] New Feature - [ ] Documentation update - [ ] Other
合并状态:未合并 0 条评论