@@ -136,6 +136,7 @@ function buildWebpackBrowser(options, context, transforms = {}) {
136136 } ) . pipe (
137137 // tslint:disable-next-line: no-big-function
138138 operators_1 . concatMap ( async ( buildEvent ) => {
139+ var _a , _b ;
139140 const { webpackStats : webpackRawStats , success, emittedFiles = [ ] } = buildEvent ;
140141 if ( ! webpackRawStats ) {
141142 throw new Error ( 'Webpack stats build result is required.' ) ;
@@ -245,7 +246,7 @@ function buildWebpackBrowser(options, context, transforms = {}) {
245246 fs . unlinkSync ( filename + '.map' ) ;
246247 }
247248 }
248- catch ( _a ) { }
249+ catch ( _c ) { }
249250 }
250251 if ( es5Polyfills ) {
251252 fs . unlinkSync ( filename ) ;
@@ -467,9 +468,7 @@ function buildWebpackBrowser(options, context, transforms = {}) {
467468 for ( const [ locale , outputPath ] of outputPaths . entries ( ) ) {
468469 let localeBaseHref ;
469470 if ( i18n . locales [ locale ] && i18n . locales [ locale ] . baseHref !== '' ) {
470- localeBaseHref = path . posix . join ( options . baseHref || '' , i18n . locales [ locale ] . baseHref === undefined
471- ? `/${ locale } /`
472- : i18n . locales [ locale ] . baseHref ) ;
471+ localeBaseHref = utils_1 . urlJoin ( options . baseHref || '' , ( _a = i18n . locales [ locale ] . baseHref , ( _a !== null && _a !== void 0 ? _a : `/${ locale } /` ) ) ) ;
473472 }
474473 try {
475474 await generateIndex ( outputPath , options , root , files , noModuleFiles , moduleFiles , transforms . indexHtml ,
@@ -485,9 +484,7 @@ function buildWebpackBrowser(options, context, transforms = {}) {
485484 for ( const [ locale , outputPath ] of outputPaths . entries ( ) ) {
486485 let localeBaseHref ;
487486 if ( i18n . locales [ locale ] && i18n . locales [ locale ] . baseHref !== '' ) {
488- localeBaseHref = path . posix . join ( options . baseHref || '' , i18n . locales [ locale ] . baseHref === undefined
489- ? `/${ locale } /`
490- : i18n . locales [ locale ] . baseHref ) ;
487+ localeBaseHref = utils_1 . urlJoin ( options . baseHref || '' , ( _b = i18n . locales [ locale ] . baseHref , ( _b !== null && _b !== void 0 ? _b : `/${ locale } /` ) ) ) ;
491488 }
492489 try {
493490 await service_worker_1 . augmentAppWithServiceWorker ( host , root , core_1 . normalize ( projectRoot ) , core_1 . normalize ( outputPath ) , localeBaseHref || options . baseHref || '/' , options . ngswConfigPath ) ;
0 commit comments