ember-cli / ember-cli/babel-plugin-debug-macros
Wrong transpilation for renamed import
未关闭
- 主要语言
- TypeScript
- 星标
- 13
- 派生
- 13
- PR 合并指标
- 30 天内没有已合并 PR
描述
Given this reproduction file: https://github.com/simonihmig/ember-warn-transpilation/blob/master/app/utils/warn.js
This is transpiled to:
```js
define('ember-warn-transpilation/utils/warn', ['exports'], function (exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = warn;
function warn() {
(true && Ember.emberWarn(...arguments));
}
});
```
Where `Ember.emberWarn` is obviously not a thing.
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 app/utils/warn.js 中的复现开始,并将其中重命名后的 import 与 issue 中所示的生成 define 输出进行比较。跟踪 Babel plugin 在转译过程中如何处理该 import。完成标准是生成的引用保留预期的导入名称,而不是生成 Ember.emberWarn,并为该复现添加回归检查。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- babel, javascript
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100