Snowpack 3.0 is out now! Read the announcement post →

SSL Certificates

This guide has an example repo: examples/https-ssl-certificates
npm start -- --secure

Snowpack provides an easy way to use a local HTTPS server during development through the use of the --secure flag. When enabled, Snowpack will look for a snowpack.key and snowpack.crt file in the root directory and use that to create an HTTPS server with HTTP2 support enabled.

Generating SSL Certificates

You can automatically generate credentials for your project via either:

In most situations you should add personally generated certificate files (snowpack.key and snowpack.crt) to your .gitignore file.