|Plugin names:||trust-dev-certificate-plugin implemented by TrustDevCertificatePlugin.ts |
untrust-dev-certificate-plugin implemented by UntrustDevCertificatePlugin.ts
|Plugin config file:||(none)|
This is a Heft plugin to manage self-signed SSL certificates for an
https://localhost development server.
The underlying functionality is provided by the @rushstack/debug-certificate-manager library, which provides functions to generate, self-sign, trust, and untrust .pem certificates for both Windows and Mac OS.
When to use it
http://localhost works fine for local development, however HTTPS may be required if your
app needs to make requests to a production service whose CORS
policy requires SSL. For that situation, your
webpack-dev-server or Node.js service will need to be
configured with a self-signed certificate. This plugin automatically generates the certificate, installs it,
and configures your OS to trust it.
# If you are using Rush, run this shell command in your project folder:
rush add --package @rushstack/heft-dev-cert-plugin --dev
# If you are using vanilla NPM, run this shell command in your project folder:
npm install @rushstack/heft-dev-cert-plugin --save-dev
trust-dev-certificate-plugin can be mapped to
heft trust-dev-cert and
heft untrust-dev-cert actions
with a configuration such as: