I am trying to rename a file during the assets copy of ng build
Here is what I have used in angular.json
:
"outputPath": "dist",
"assets": [
...,
{
"glob": "favicon-v1.png",
"input": "src/client",
"output": "/favicon.png"
},
...,
],
Instead of creating file dist/favicon.png
, ng build
is creating a dist/favicon.png/favicon-v1.png
.
It seems to refuse to rename the file - it always creates a folder with the name I wanted to use favicon.png
and then puts the original file inside it.
Is it expected behavior? Any workaround other than renaming the file favicon-v1.png
to favicong.png
in the source control?
I am using:
"@angular/cli": "^6.1.5"
"@angular/animations": "^6.0.1",
"@angular/common": "^6.0.1",
"@angular/compiler": "^6.0.1",
"@angular/core": "^6.0.1",
"@angular/forms": "^6.0.1",
"@angular/http": "^6.0.1",
"@angular/platform-browser": "^6.0.1",
"@angular/platform-browser-dynamic": "^6.0.1",
"@angular/router": "^6.0.1",
"@angular/upgrade": "^6.0.1",
Update: Similar code works fine with angular-cli.json in Angular 5.