feat: add option to disable route extraction feature
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- angular, typescript
- Domínio
- build-system, web-dev
Direção de pesquisa
Comece com o comando de build e o comportamento existente de NG_BUILD_PARTIAL_SSR=1 e, em seguida, reproduza o problema usando a linha 9 de src/main.server.ts no repositório de exemplo vinculado. Está concluído quando uma flag pode desabilitar a extração de rotas durante o build ou o serve, enquanto as aplicações com rotas carregadas dinamicamente continuam funcionando.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Command
build
Description
When migrating apps to SSR, route extraction basically gets in the way and makes it harder to understand where the issue/error is coming from, as it tries to run before everything else either during build or server.
Instead of fixing other SSR related errors, I have to go and fix route extraction issues.
Also, there is no way to know if route extraction is happening. But even if it was possible the code would be full of checks on what mode is Angular running, and having to deal with all the states instead of just handling a normal case of -> open the url -> render angular -> serve html.
Describe the solution you'd like
Add a flag to disable route extraction during build or serve totally, at least just for development purposes.
When routes are dynamically loaded based on config, having the extraction happen before the config can be loaded breaks the dynamic apps. If I build my app with a config that has 3 routes, and then on runtime I want to use another config.json file to load other routes (that also include the first three but with different configs), would cause my app to misbehave because of the initial extracted routes.
NG_BUILD_PARTIAL_SSR=1 partially solves this by skipping the route extraction and doing it initial request.
Repo
Comment out line 9 to better understand that serving or building the app is painful, even though on normal conditions opening localhost:4200/config.json loads fine.
https://github.com/eneajaho/dx-issue/blob/main/src/main.server.ts#L9
- Linguagem predominante
- TypeScript
- Estrelas
- 27k
- Forks
- 11.8k
- Merge médio
- 17h 25min
- PRs com merge (30d)
- 183
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de angular/angular-cli
-
area: @angular/build gemini-triaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
angular/angular-cli#33055 · 1 comentário · 3 reações ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 responsável ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 responsável ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34128 · 1 responsável ·
Todas as issues de angular/angular-cli
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
bug v2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
modelcontextprotocol/inspector#2458 · 1 comentário ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
carbon-design-system/ibm-products#9907 ·