Using Windows Self Signed Certs with webpack

Maybe you are a glutton for punishment and want to figure out how to use your Windows Generated Self Signed Cert with webpack for building an extension against localhost. While poorly documented, it isn’t that hard.

In Powershell, follow the top Example but set your DNS name to localhost (or wherever you are pointing your dev extension at).

(Double click the .pfx file to install it to your Cert Storage if you have other uses for it in the Windows world)

Then copy the .pfx file to wherever you have the conf directory for your webpack server.
Then add the following to your webpack-dev-server start command
--https --pfx=./test_cert.pfx --pfx-passphrase=sample

You can install the Cert as trusted (and get rid of the annoying security popup) on your browser by following the instructions below.
Firefox Install Instructions
Chrome Install Instructions

Hope this someday saves someone a 1/2 hour of looking into that nightmare!

1 Like

This works great if you’re testing your locally-hosted extension directly on the website!

I’ve had trouble w/ self-signed certs and the Devrig, though.