angular / angular/angular-cli

Support renaming of asset file

Open
#8,808 9 comments 66 reactions 0 assignees View on GitHub
area: @angular-devkit/build-angular devkit/build-angular:browser feature feature: under consideration
Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
14h 23m
Merged PRs (30d)
162

Description

### Feature request

It would be nice have an option to rename an asset in certain situations, e.g. when having conflicts in third party stuff.
Add property "filename" with the new file name.
Will only be used when the glob resolves to exactly one file.
```
"assets": [
{ "glob": "**/*", "input": "./assets/", "output": "./assets/" },
{ "glob": "favicon.ico", "input": "./", "output": "./", "filename": "newname.ico" },
]
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Angular CLI code that resolves and copies the assets glob, using the configuration example in this issue as the expected input. Find the related asset-processing tests, then verify that a single matched asset can receive the configured filename while existing glob behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.