Follow-up to issue: SSR: Add a way to configure externalDependencies for the server bundle only
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- build-system
Direzione di ricerca
Start from the application-builder option definitions where externalDependencies is declared (schema and option resolution under packages/angular/build), then locate where the server and browser esbuild configurations diverge. Note the report that dev builds and prod builds are configured differently — both paths must apply the new option. Done looks like a server-only externalization option that is accepted, applied only to the server bundle (e.g. graphql external on server, bundled in browser), and verified with an SSR build; API naming needs maintainer sign-off first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Command
build
Description
As title says, I'd like to follow-up on the unfortunately closed issue https://github.com/angular/angular-cli/issues/26487, requesting to configure externalDependencies independently for server and browser bundle.
Reading the mentioned issue, it has been closed because no particular value has been seen in being able to configure externalDependencies independently. However I'd like to point to a realistic and important case where such an option will be crucial.
Right now, we're still on using Webpack, which allows configuring externalDependencies explicitly for the server bundle, and that's the reason why it's not blocking us yet. But there's plans to eventually migrate to application-builder, however still a lot of obstacles ned to be solved, as like the mentioned lack of being able to define externalDependencies for server bundle only.
Our case is, we're using DataDog dd-trace for monitoring our server app infrastructure. dd-trace is being injected on runtime and requires all node packages doing downstream requests being external as otherwise it cannot properly trace them. See https://docs.datadoghq.com/tracing/trace_collection/dd_libraries/nodejs/#bundling
In our particular scenario, this applies to graphql package. We had to externalize it, as otherwise we wouldn't get logs for all requests towards our GraphQL API on server-side. But on the client-side using the browser-bundle we do not want graphql package being external, as there's absolutely no reason in it.
So, our particular needs can be properly served by using Webpack builder but with the current options for application-builder this isn't possible.
As a workaround I tried to implement a custom Esbuild plugin, which should reset the external dependencies just for the browser build. But due to the Angular build architecture this only works for a prod build but not for a development build. So I eventually dropped this idea, which anyway doesn't seem clean.
Hence I'd highly appreciate if you could change your mind in considering separate externalDependencies configurations for server and browser build.
Describe the solution you'd like
Being able to configure externalDependencies separately for server and browser build.
Describe alternatives you've considered
No response
- Lingua principale
- TypeScript
- Stelle
- 27k
- Fork
- 11.8k
- Merge medio
- 1g 32m
- PR unite (30g)
- 138
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
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/cli
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
angular/angular-cli#34307 ·
I maintainer di solito rispondono entro 1 giorno
-
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
-
SSR resolves relative `redirectTo` against the wrong base when the route path has several segmentsForse già presa @bschaeublin l’ha presa 2 giorni fa. Apertaarea: @angular/ssr
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
angular/angular-cli#34300 ·
I maintainer di solito rispondono entro 1 giorno
-
SSR route redirects drop the query string on relative `redirectTo`Forse già presa @bschaeublin l’ha presa 2 giorni fa. Apertaarea: @angular/ssr
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
angular/angular-cli#34298 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di angular/angular-cli
Issue simili
-
nextjs-tracking
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
cloudflare/vinext#3887 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
apache/rocketmq-dashboard#6331 ·
I maintainer di solito rispondono entro 5 giorni
-
bug cache clinical-safety P1-critical
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
juspay/blend-design-system#1788 ·
I maintainer di solito rispondono entro 1 giorno
-
[Analytics] Add Focus Time-Block Efficiency Ratio Calculator in src/lib/focus/efficiency-ratio.tsApertaanalytics beginner friendly community contributions-welcome enhancement good first issue hacktoberfest help wanted up-for-grabs
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno