File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -149,12 +149,13 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
149149 // tslint:disable-next-line: no-any
150150 ( compilation . mainTemplate . hooks as any ) . assetPath . tap (
151151 'build-angular' ,
152- ( filename : string , data : ChunkData ) => {
153- const isMap = filename && filename . endsWith ( '.map' ) ;
152+ ( filename : string | ( ( data : ChunkData ) => string ) , data : ChunkData ) => {
153+ const assetName = typeof filename === 'function' ? filename ( data ) : filename ;
154+ const isMap = assetName && assetName . endsWith ( '.map' ) ;
154155
155156 return data . chunk && data . chunk . name === 'polyfills-es5'
156157 ? `polyfills-es5${ hashFormat . chunk } .js${ isMap ? '.map' : '' } `
157- : filename ;
158+ : assetName ;
158159 } ,
159160 ) ;
160161 } ) ;
You can’t perform that action at this time.
0 commit comments