@@ -52,7 +52,7 @@ function _removeReflectFromPolyfills(tree: Tree, path: string) {
52
52
* @param targetObject The target information.
53
53
* @private
54
54
*/
55
- function _updateProjectTarget ( root : string , targetObject : json . JsonObject ) : Rule {
55
+ function _updateProjectTarget ( targetObject : json . JsonObject ) : Rule {
56
56
// Make sure we're using the correct builder.
57
57
if ( targetObject . builder !== '@angular-devkit/build-angular:browser'
58
58
|| ! json . isJsonObject ( targetObject . options ) ) {
@@ -63,7 +63,7 @@ function _updateProjectTarget(root: string, targetObject: json.JsonObject): Rule
63
63
return noop ( ) ;
64
64
}
65
65
66
- const polyfillsToUpdate = [ ` ${ root } / ${ options . polyfills } ` ] ;
66
+ const polyfillsToUpdate = [ options . polyfills ] ;
67
67
const configurations = targetObject . configurations ;
68
68
if ( json . isJsonObject ( configurations ) ) {
69
69
for ( const configName of Object . keys ( configurations ) ) {
@@ -73,7 +73,7 @@ function _updateProjectTarget(root: string, targetObject: json.JsonObject): Rule
73
73
if ( json . isJsonObject ( config )
74
74
&& typeof config . polyfills == 'string'
75
75
&& config . aot !== true ) {
76
- polyfillsToUpdate . push ( ` ${ root } / ${ config . polyfills } ` ) ;
76
+ polyfillsToUpdate . push ( config . polyfills ) ;
77
77
}
78
78
}
79
79
}
@@ -125,7 +125,7 @@ export function polyfillMetadataRule(): Rule {
125
125
for ( const targetName of Object . keys ( targets ) ) {
126
126
const target = targets [ targetName ] ;
127
127
if ( json . isJsonObject ( target ) ) {
128
- rules . push ( _updateProjectTarget ( project . root , target ) ) ;
128
+ rules . push ( _updateProjectTarget ( target ) ) ;
129
129
}
130
130
}
131
131
}
0 commit comments