Skip to content

Commit ff58f77

Browse files
alan-agius4clydin
authored andcommitted
refactor(@angular-devkit/build-angular): pass SSL cert and key path to dev-server
Since version 4.2.0 webpack-dev-server supports read the mentioned files. See: https://github.com/webpack/webpack-dev-server/blob/9bb6f7894833fa561882258a307e45294427187b/CHANGELOG.md#420-2021-09-09
1 parent d2e302c commit ff58f77

File tree

1 file changed

+3
-3
lines changed
  • packages/angular_devkit/build_angular/src/webpack/configs

1 file changed

+3
-3
lines changed

packages/angular_devkit/build_angular/src/webpack/configs/dev-server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import { logging, tags } from '@angular-devkit/core';
10-
import { existsSync, readFileSync } from 'fs';
10+
import { existsSync } from 'fs';
1111
import { posix, resolve } from 'path';
1212
import * as url from 'url';
1313
import * as webpack from 'webpack';
@@ -143,8 +143,8 @@ function getSslConfig(root: string, options: WebpackDevServerOptions): Configura
143143
const { ssl, sslCert, sslKey } = options;
144144
if (ssl && sslCert && sslKey) {
145145
return {
146-
key: readFileSync(resolve(root, sslKey), 'utf-8'),
147-
cert: readFileSync(resolve(root, sslCert), 'utf-8'),
146+
key: resolve(root, sslKey),
147+
cert: resolve(root, sslCert),
148148
};
149149
}
150150

0 commit comments

Comments
 (0)