Follow-up to issue: SSR: Add a way to configure externalDependencies for the server bundle only
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
- 領域
- build-system
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- TypeScript
- 星號
- 27k
- 分支
- 11.8k
- 平均合併
- 1 天 1 小時
- 30 天內合併 PR
- 161
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
angular/angular-cli 的其他 Issue
-
area: @angular/build gemini-triaged
難度 2/5 1-3 小時 新手友好度 74/100
angular/angular-cli#33955 ·
維護者通常 1 天內回覆
-
area: @angular/cli gemini-triaged
難度 2/5 1-3 小時 新手友好度 72/100
angular/angular-cli#33055 · 1 則留言 · 3 個 reaction ·
維護者通常 1 天內回覆
-
SSR resolves relative `redirectTo` against the wrong base when the route path has several segments可能已有人在做 @bschaeublin 今天認領。 未關閉area: @angular/ssr
難度 3/5 1-2 天 新手友好度 45/100
angular/angular-cli#34300 ·
維護者通常 1 天內回覆
-
SSR route redirects drop the query string on relative `redirectTo`可能已有人在做 @bschaeublin 今天認領。 未關閉area: @angular/ssr
難度 3/5 1-2 天 新手友好度 45/100
angular/angular-cli#34298 ·
維護者通常 1 天內回覆
-
area: @angular/build
難度 4/5 3-5 天 新手友好度 25/100
angular/angular-cli#34292 ·
維護者通常 1 天內回覆
查看 angular/angular-cli 的全部 Issue
相似的 Issue
-
bug confirmed perf
難度 2/5 1-3 小時 新手友好度 72/100
videojs/video.js#9400 · 1 則留言 ·
維護者通常 1 天內回覆
-
good first issue hacktoberfest
難度 2/5 半天 新手友好度 70/100
HelpCode-ai/anythingmcp#996 ·
維護者通常 1 天內回覆
-
check:passed streams:add
難度 1/5 1-3 小時 新手友好度 72/100
維護者通常 2 天內回覆
-
beta technical-medium ui
難度 2/5 1-3 小時 新手友好度 62/100
walletbeat/walletbeat#1625 ·
維護者通常 1 天內回覆
-
[Good First Issue]: Add unit tests for NetworkVersionInfo可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉Good First Issue hacktoberfest
難度 2/5 1-3 小時 新手友好度 85/100
hiero-ledger/hiero-sdk-js#4489 ·
維護者通常 1 天內回覆