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 {
149
149
// tslint:disable-next-line: no-any
150
150
( compilation . mainTemplate . hooks as any ) . assetPath . tap (
151
151
'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' ) ;
154
155
155
156
return data . chunk && data . chunk . name === 'polyfills-es5'
156
157
? `polyfills-es5${ hashFormat . chunk } .js${ isMap ? '.map' : '' } `
157
- : filename ;
158
+ : assetName ;
158
159
} ,
159
160
) ;
160
161
} ) ;
You can’t perform that action at this time.
0 commit comments