angular / angular/angular-cli

Support web workers in libraries

未关闭
#15,059 34 条评论 196 个 reaction 已指派 0 人 在 GitHub 查看
area: @schematics/angular feature feature: under consideration
主要语言
TypeScript
星标
27k
派生
11.8k
平均合并
14 小时 23 分钟
30 天内合并 PR
162

描述

# 🚀 Feature request

### Command (mark with an `x`)

```
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
```

### Description
I would like to use Web Workers in an Angular 8 library project.
In version 8.1.1 this seems to be supported for project type 'application' only:
```console
ng generate webWorker my-module/myWorker --project my-lib
Web Worker requires a project type of "application".
```

### Describe the solution you'd like
Generating a Web Worker should work for project type 'library' as well.

### Describe alternatives you've considered
Rewrite TypeScript worker code to JavaScript file.

贡献指南

打开贡献指南

调研方向

首先运行 `ng generate webWorker my-module/myWorker --project my-lib`,并跟踪 generate 命令的项目类型验证过程。完成的标准是:该命令能够为库项目生成 Web Worker,而不是报告 worker 需要应用程序。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
cli
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。