angular / angular/angular-cli

Fonts are not resolved when using base href

Aberta
#30,332 7 comentários 0 reações 0 responsáveis Ver no GitHub
angular/build:application area: @angular/build area: docs
Linguagem predominante
TypeScript
Estrelas
27k
Forks
11.8k
Merge médio
14h 23min
PRs com merge (30d)
162

Descrição

### Command

build

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

I'm trying to deploy an Angular application to GitHub Pages using GitHub Actions. I've set the base href correctly, but the sources aren't showing up. The routes to get the sources ignore the base href. I've also tried specifying the deploy-url, but I get the same result.

### Minimal Reproduction

1. Create a project.
2. Add a custom font that's in the public folder.

![Image](https://github.com/user-attachments/assets/3c1d5e3d-e896-4fd6-830c-e5db839c1ab3)

3. Build the project with a base href and deploy it.
4. Note that the font URL ignores the base href.

### Exception or Error

```text

```

### Your Environment

```text
Angular CLI: 19.1.7
Node: 22.14.0
Package Manager: npm 10.9.2
OS: win32 x64

Angular:
...

Package Version
------------------------------------------------------
@angular-devkit/architect 0.1901.7 (cli-only)
@angular-devkit/core 19.1.7 (cli-only)
@angular-devkit/schematics 19.1.7 (cli-only)
@schematics/angular 19.1.7 (cli-only)
```

### Anything else relevant?

_No response_

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece reproduzindo o comando `build` com uma fonte personalizada na pasta `public` e um base href configurado. Rastreie como o build do Angular CLI gera a URL da fonte e, em seguida, verifique se a saída compilada a resolve abaixo do caminho base, em vez de na raiz do site.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
angular, typescript
Domínio
build-system
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
38/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.