@@ -52,7 +52,7 @@ function _removeReflectFromPolyfills(tree: Tree, path: string) {
5252 * @param targetObject The target information.
5353 * @private
5454 */
55- function _updateProjectTarget ( root : string , targetObject : json . JsonObject ) : Rule {
55+ function _updateProjectTarget ( targetObject : json . JsonObject ) : Rule {
5656 // Make sure we're using the correct builder.
5757 if ( targetObject . builder !== '@angular-devkit/build-angular:browser'
5858 || ! json . isJsonObject ( targetObject . options ) ) {
@@ -63,7 +63,7 @@ function _updateProjectTarget(root: string, targetObject: json.JsonObject): Rule
6363 return noop ( ) ;
6464 }
6565
66- const polyfillsToUpdate = [ ` ${ root } / ${ options . polyfills } ` ] ;
66+ const polyfillsToUpdate = [ options . polyfills ] ;
6767 const configurations = targetObject . configurations ;
6868 if ( json . isJsonObject ( configurations ) ) {
6969 for ( const configName of Object . keys ( configurations ) ) {
@@ -73,7 +73,7 @@ function _updateProjectTarget(root: string, targetObject: json.JsonObject): Rule
7373 if ( json . isJsonObject ( config )
7474 && typeof config . polyfills == 'string'
7575 && config . aot !== true ) {
76- polyfillsToUpdate . push ( ` ${ root } / ${ config . polyfills } ` ) ;
76+ polyfillsToUpdate . push ( config . polyfills ) ;
7777 }
7878 }
7979 }
@@ -125,7 +125,7 @@ export function polyfillMetadataRule(): Rule {
125125 for ( const targetName of Object . keys ( targets ) ) {
126126 const target = targets [ targetName ] ;
127127 if ( json . isJsonObject ( target ) ) {
128- rules . push ( _updateProjectTarget ( project . root , target ) ) ;
128+ rules . push ( _updateProjectTarget ( target ) ) ;
129129 }
130130 }
131131 }
0 commit comments