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

Implements RFC 496 Incorrectly

未关闭
#713 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
77
派生
65
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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