Support renaming of asset file

Open
#8,808 9 comments 66 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

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.

Description

area: @angular-devkit/build-angular devkit/build-angular:browser feature feature: under consideration
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" },
]
Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
16h 35m
Merged PRs (30d)
176

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from angular/angular-cli

All issues in angular/angular-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.