A Vite plugin to generate trusted SSL/TLS certificates for local development.
Important
This plugin is based on @expo/devcert
, an actively maintained fork of devcert
. Read about how it works and its implications on security.
On NodeJS or Bun, install from npm:
npm install @idleberg/vite-plugin-devcert
On Deno you will likely want to use JSR:
deno add jsr:@idleberg/vite-plugin-devcert
Note
Unless your package manager is set up to install peer dependencies automatically, you need to install @expo/devcert
yourself.
import { defineConfig } from "vite";
import devcert from "@idleberg/vite-plugin-devcert";
export default defineConfig({
plugins: [devcert()],
});
devcert(options?)
If certutil
is not installed already (for updating NSS databases; e.g. Firefox), do not attempt to install it. Read the documentation for more.
Do not update your systems host file with the domain name of the certificate. Read the documentation for more.
This work is licensed under The MIT License.