angular / angular/angular-cli

Add support for SharedWorker in ng-cli

未關閉
#20,279 5 則留言 29 個 reaction 已指派 0 人 在 GitHub 檢視
area: @schematics/angular feature feature: insufficient votes
主要語言
TypeScript
星號
27k
分支
11.8k
平均合併
14 小時 23 分鐘
30 天內合併 PR
162

描述

# 🚀 feature request

### Relevant Package
This feature request is for @angular/cli

### Description
ng generate can currently handle web-workers and service-workers, but not shared-workers. It would be very helpful if shared workers could be handled similarly.

Right now there's very little documentation about how to setup shared workers with angular, unlike web workers where I can simply call `ng generate web-worker` and start filling in my code.

### Describe the solution you'd like
There should be an `ng generate shared-worker` command that works similar to the commands for web and service workers.

### Describe alternatives you've considered
This [medium article](https://medium.com/@nikita.s.barsukov/dedicated-and-shared-web-workers-in-angular-c3df473882f6) and [these](https://stackoverflow.com/questions/64495077/how-to-use-sharedworker-in-angular/64495078#64495078) [two](https://stackoverflow.com/questions/46159496/how-to-configure-angular-cli-generated-project-to-include-a-sharedworker) Stack Overflow questions both have different solutions to make this work.

貢獻指南

開啟貢獻指南

研究方向

Start with the existing ng generate web-worker and service-worker entry points and compare how they configure generated projects. Define the shared-worker command's expected setup and documentation, then verify that ng generate shared-worker produces a usable shared worker similarly to the existing commands.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
angular, typescript
領域
build-system, cli
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。