create-cert-files
Create self signed cert files to be used with webpack-dev-server or browsersync
Usage with BrowserSync
npm install --dev create-cert-files browser-sync
const fakeCert = const browserSync = browserSync
Usage with webpack
npm install --save-dev create-cert-files
In your webpack.config.js
const fakeCert = optionsconst fs = moduleexports = devServer: https: key: fs cert: fs
options
keyPath
Path of key file
certPath
Path of cert file
altNames
An array of subjectAltName
// type 2 is DNS type: 2 value: 'localhost' // type 7 is IP type: 7 ip: '127.0.0.1'
- Profit