application builder's dev-server doesn't work with imports of html files from ts
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 68/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- typescript, vite, webpack
- Domaine
- build-system, cli, devtools
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- TypeScript
- Étoiles
- 27k
- Forks
- 11.8k
- Merge moyen
- 20 h 47 min
- PR mergées (30 j)
- 178
Préparer son environnement
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de angular/angular-cli
-
Can't use an array of hostnames in --allowedHosts cli parameter in @angular/build:dev-serverOuvertearea: @angular/build gemini-triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
angular/angular-cli#33955 ·
Les mainteneurs répondent en général sous 1 jour
-
area: @angular/cli gemini-triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
angular/angular-cli#33055 · 1 commentaire · 3 réactions ·
Les mainteneurs répondent en général sous 1 jour
-
library builder: tslib is not added to the output package.jsonPeut-être pris @alan-agius4 l’a pris il y a 5 jours. Ouverteangular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
library builder: a name re-exported through two "export *" paths is dropped from the bundlePeut-être pris @alan-agius4 l’a pris il y a 5 jours. Ouverteangular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
library builder: entry points a/b and a-b are built into the same bundlePeut-être pris @alan-agius4 l’a pris il y a 6 jours. Ouverteangular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34128 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de angular/angular-cli
Issues similaires
-
ADD openalgoOuvertetemplate
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
factory-active factory-automatic task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
vercel/ai#21528 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
bug Needs: Triage :mag:
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
microsoft/fluentui-contrib#671 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
sveltejs/acorn-typescript#150 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100