application builder's dev-server doesn't work with imports of html files from ts
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript, vite, webpack
- Ambito
- build-system, cli, devtools
Direzione di ricerca
Start with the StackBlitz reproduction and src/main.ts, then trace the application builder's serve handling for the configured .html file loader and compare it with the working SVG case and ng build output. Done means the serve command returns test.html's contents instead of index.html, while the existing SVG behavior remains working.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Command
serve
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
When configuring a file loader for .html, the asset doesn't seem to get added to the list of files served by vite. This does work with ng build, as well as with the webpack builder's serve function, as well as with other filetypes (svg in the demo below).
Minimal Reproduction
https://stackblitz.com/edit/stackblitz-starters-ejbbdzyh?file=src%2Fmain.ts
See that the clicking on the SVG works fine (you get a giant purple square), but when clicking on the HTML link instead of the test file's contents you get what is, effectively, index.html. However if you do a ng build, the test.html will end up properly in the target directory.
Exception or Error
Request for HTML file "/media/test.html" was received but no asset found. Asset may be missing from build.
Your Environment
Angular CLI : 22.2.0
Angular : 22.2.0
Node.js : 22.22.3
Package Manager : npm 10.8.2
Operating System : linux x64
┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build │ 22.2.0 │ ^22.2.0 │
│ @angular/cli │ 22.2.0 │ ^22.2.0 │
│ @angular/common │ 22.2.0 │ ^22.2.0 │
│ @angular/compiler │ 22.2.0 │ ^22.2.0 │
│ @angular/compiler-cli │ 22.2.0 │ ^22.2.0 │
│ @angular/core │ 22.2.0 │ ^22.2.0 │
│ @angular/forms │ 22.2.0 │ ^22.2.0 │
│ @angular/platform-browser │ 22.2.0 │ ^22.2.0 │
│ @angular/router │ 22.2.0 │ ^22.2.0 │
│ rxjs │ 7.8.2 │ ^7.8.1 │
│ typescript │ 6.0.3 │ ^6.0.3 │
│ zone.js │ 0.16.1 │ ^0.16.1 │
└───────────────────────────┴───────────────────┴───────────────────┘
Anything else relevant?
No response
- Lingua principale
- TypeScript
- Stelle
- 27k
- Fork
- 11.8k
- Merge medio
- 17h 47m
- PR unite (30g)
- 181
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di angular/angular-cli
-
area: @angular/build gemini-triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
angular/angular-cli#33955 ·
I maintainer di solito rispondono entro 1 giorno
-
area: @angular/cli gemini-triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
angular/angular-cli#33055 · 1 commento · 3 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Angular CLI can copy files from outside the workspace root through symlinked asset directoriesApertaarea: @angular/build gemini-triaged
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
angular/angular-cli#34164 ·
I maintainer di solito rispondono entro 1 giorno
-
area: @angular/build gemini-triaged severity5: regression
Difficoltà 4/5 3-5 giorni Idoneità per principianti 75/100
angular/angular-cli#34163 ·
I maintainer di solito rispondono entro 1 giorno
-
area: @angular/build gemini-triaged severity5: regression
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
angular/angular-cli#34162 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di angular/angular-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
diegosouzapw/OmniRoute#14869 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
I maintainer di solito rispondono entro 1 giorno
-
status: waiting triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
freeCodeCamp/freeCodeCamp#70412 ·
I maintainer di solito rispondono entro 1 giorno
-
Mend: dependency security vulnerability untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
opensearch-project/OpenSearch-Dashboards#12816 ·
I maintainer di solito rispondono entro 1 giorno