Fonts are not resolved when using base href

Aperta
#30,332 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
angular, typescript
Ambito
build-system

Direzione di ricerca

Inizia riproducendo il comando build con un font personalizzato nella cartella public e un base href configurato. Traccia il modo in cui la build di Angular CLI genera l’URL del font, quindi verifica che l’output compilato lo risolva sotto il percorso di base anziché nella root del sito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

angular/build:application area: @angular/build area: docs
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

  1. Build the project with a base href and deploy it.
  2. Note that the font URL ignores the base href.
Exception or Error

Your Environment
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

Lingua principale
TypeScript
Stelle
27k
Fork
11.8k
Merge medio
16h 35m
PR unite (30g)
176

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di angular/angular-cli

Tutte le issue di angular/angular-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.