Follow-up to issue: SSR: Add a way to configure externalDependencies for the server bundle only
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- build-system
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- TypeScript
- Sterne
- 27k
- Forks
- 11.8k
- Ø Merge
- 1 T. 2 Min.
- Gemergte PRs (30 T.)
- 168
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus angular/angular-cli
-
area: @angular/build gemini-triaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
angular/angular-cli#33955 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: @angular/cli gemini-triaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
angular/angular-cli#33055 · 1 Kommentar · 3 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
dev-server: es2016 prebundle target for zone.js apps lowers private fields and breaks dependenciesOffenarea: @angular/build
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
angular/angular-cli#34280 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Vite dev server: proxy config normalization reorders glob keys, drops string `context` and misses URLs with a query stringEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenarea: @angular/build
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 65/100
angular/angular-cli#34257 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add CSP nonce to <link rel="stylesheet"> tags when ngCspNonce is setEvtl. vergeben @alan-agius4 hat das vor 2 Tagen übernommen. Offenarea: @angular/build
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
angular/angular-cli#34255 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in angular/angular-cli
Ähnliche Issues
-
Tenant
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
MTES-MCT/Dossier-Facile-Frontend#2061 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:frontend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
interledger/publisher-tools#905 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add: Cbeebies PL SDOffenapproved check:passed streams:add
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
iptv-org/iptv#54525 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
DB-plane provider_chat_options.* is accepted by config set but never merged into the loaded configEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
area:web
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
praetorianer777/GoTome#178 ·
Maintainer antworten meist innerhalb von 1 Tag