File tree 3 files changed +20
-15
lines changed
packages/angular_devkit/build_angular/src/webpack/configs
3 files changed +20
-15
lines changed Original file line number Diff line number Diff line change 119
119
"@types/semver" : " ^7.0.0" ,
120
120
"@types/text-table" : " ^0.2.1" ,
121
121
"@types/uuid" : " ^8.0.0" ,
122
- "@types/webpack-dev-server" : " ^4.0.3 " ,
122
+ "@types/webpack-dev-server" : " ^4.5.0 " ,
123
123
"@typescript-eslint/eslint-plugin" : " 5.4.0" ,
124
124
"@typescript-eslint/parser" : " 5.4.0" ,
125
125
"@yarnpkg/lockfile" : " 1.1.0" ,
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ export async function getDevServerConfig(
83
83
} ,
84
84
compress : false ,
85
85
static : false ,
86
- https : getSslConfig ( root , wco . buildOptions ) ,
86
+ server : getServerConfig ( root , wco . buildOptions ) ,
87
87
allowedHosts : getAllowedHostsConfig ( wco . buildOptions ) ,
88
88
devMiddleware : {
89
89
publicPath : servePath ,
@@ -139,19 +139,25 @@ export function buildServePath(
139
139
* Private method to enhance a webpack config with SSL configuration.
140
140
* @private
141
141
*/
142
- function getSslConfig (
142
+ function getServerConfig (
143
143
root : string ,
144
144
options : WebpackDevServerOptions ,
145
- ) : DevServerConfiguration [ 'https ' ] {
145
+ ) : DevServerConfiguration [ 'server ' ] {
146
146
const { ssl, sslCert, sslKey } = options ;
147
- if ( ssl && sslCert && sslKey ) {
148
- return {
149
- key : resolve ( root , sslKey ) ,
150
- cert : resolve ( root , sslCert ) ,
151
- } ;
147
+ if ( ! ssl ) {
148
+ return 'http' ;
152
149
}
153
150
154
- return ssl ;
151
+ return {
152
+ type : 'https' ,
153
+ options :
154
+ sslCert && sslKey
155
+ ? {
156
+ key : resolve ( root , sslKey ) ,
157
+ cert : resolve ( root , sslCert ) ,
158
+ }
159
+ : undefined ,
160
+ } ;
155
161
}
156
162
157
163
/**
Original file line number Diff line number Diff line change 114
114
115
115
" @angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#6cdeb28b4c4adfa8c7e3a84f5ca5cb11bab21760 " :
116
116
version "0.0.0-2357f952775070b44dbc09363c4593d033b982b3"
117
- uid "6cdeb28b4c4adfa8c7e3a84f5ca5cb11bab21760"
118
117
resolved "https://github.com/angular/dev-infra-private-builds.git#6cdeb28b4c4adfa8c7e3a84f5ca5cb11bab21760"
119
118
dependencies :
120
119
" @actions/core" " ^1.4.0"
2274
2273
tapable "^2.1.1"
2275
2274
webpack "^5.38.1"
2276
2275
2277
- " @types/webpack-dev-server@^4.0.3 " :
2278
- version "4.3.1 "
2279
- resolved "https://registry.yarnpkg.com/@types/webpack-dev-server/-/webpack-dev-server-4.3.1 .tgz#e6174f753aabdd3b2de8e4bc98df024365067011 "
2280
- integrity sha512-sFAFnvz1Ah17Kt4pFjATbPtuAmFS9s2dUUKhpz0kkB+X7vpJF2tbO7JoHP42od0SKijtrB7CHbsa3/lnztjpvw ==
2276
+ " @types/webpack-dev-server@^4.5.0 " :
2277
+ version "4.5.0 "
2278
+ resolved "https://registry.yarnpkg.com/@types/webpack-dev-server/-/webpack-dev-server-4.5.0 .tgz#52a983de97db81a38b7309a8cf8a730c3e02f28e "
2279
+ integrity sha512-HMb6pZPANObue3LwbdpQLWzQyF9O0wntiPyXj4vGutlAbNKTXH4hDCHaZyfvfZDmFn+5HprrWHm1TGt3awNr/A ==
2281
2280
dependencies :
2282
2281
" @types/bonjour" " *"
2283
2282
" @types/connect-history-api-fallback" " *"
You can’t perform that action at this time.
0 commit comments