vite-plugin-mkcert-ssl
v1.0.0
Published
Vite plugin to load mkcert certificates with CORS support for .test domains
Maintainers
Readme
vite-plugin-mkcert-ssl
Vite plugin to load mkcert certificates with IPv6 and CORS support for .test domains.
Install
npm i -D vite-plugin-mkcert-sslUsage
import mkcertSsl from 'vite-plugin-mkcert-ssl';
export default defineConfig({
plugins: [
mkcertSsl({
certDir: '/home/youruser/path/to/mkcert',
domains: ['localhost', '*.test'],
}),
],
});Options
| Option | Default | Description |
|-----------|----------------|------------------------------------------|
| certDir | required | Path to directory containing _cert.pem |
| pem | _cert.pem | Combined cert+key PEM filename |
| host | ::1 | Host to bind Vite dev server to |
| port | 5173 | Port Vite dev server runs on |
| domains | ['localhost']| Domains allowed via CORS |
