2.3.0 / compatible
@vitejs/plugin-basic-ssl
A Vite plugin to generate untrusted certificates for HTTPS dev servers
Install dependency
v add @vitejs/plugin-basic-ssl- Published
- Mar 24, 2026
- License
- MIT
- weekly downloads
- 5,701,242
- Compatibility
- Vite compatible ^6.0.0 || ^7.0.0 || ^8.0.0 · Rollup incompatible · Rolldown incompatible
- Categories
- server
- Keywords
- vite, vite-plugin, certificate, https
Published README
@vitejs/plugin-basic-ssl 
A plugin to generate untrusted certificates which still allows to access the page after proceeding a wall with warning.
In most scenarios, it is recommended to generate a secure trusted certificate instead and use it to configure server.https
Usage
// vite.config.js
import basicSsl from '@vitejs/plugin-basic-ssl'
export default {
plugins: [
basicSsl({
/** name of certification */
name: 'test',
/** custom trust domains */
domains: ['*.custom.com'],
/** optional, days before certificate expires */
ttlDays: 30,
/** custom certification directory */
certDir: '/Users/.../.devServer/cert',
}),
],
}
License
MIT