passing https.cert and https.key options to the webpack dev server

Signed-off-by: Luka Siric <siric.luka@gmail.com>
This commit is contained in:
Luka Siric
2022-08-24 23:02:56 +02:00
parent bf340bcb4a
commit 221e951298
4 changed files with 43 additions and 2 deletions
+11 -1
View File
@@ -60,7 +60,17 @@ export async function serveBundle(options: ServeOptions) {
// See https://github.com/facebookincubator/create-react-app/issues/387.
disableDotRule: true,
},
https: url.protocol === 'https:',
https:
url.protocol === 'https:'
? {
cert: options.frontendConfig.getOptionalString(
'app.https.credentials.cert',
),
key: options.frontendConfig.getOptionalString(
'app.https.credentials.key',
),
}
: false,
host,
port,
proxy: pkg.proxy,