ember-cli / ember-cli/ember-cli-htmlbars

Implements RFC 496 Incorrectly

Đang mở
#713 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
77
Fork
65
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

ember-cli-htmlbars [configures](https://github.com/ember-cli/ember-cli-htmlbars/blob/faa39dbe53c55ba8e4cccbc2340336a69fbf7e45/lib/utils.js#L19):

```js
import { precompileTemplate } from '@ember/template-compilation'
```

to mean both `createTemplateFactory` and the wire format compilation. But that contradicts the RFC, which says that `precompileTemplate` is supposed to only produce the wire format.

The thing that's being implemented here is really `compile`, not `precompile`. `compile` is the one that automatically includes both steps.

The RFC muddies these waters by implying that `compile` would be for runtime compilation vs build-time compilation, but even if that is a true distinction we want to maintain, then we still need something that means "both steps, but at build time".

I would argue that `precompile` already means that in practice because of how it's implemented, and we could amend the RFC to make that clear.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.