Skip to content

Commit f7b141f

Browse files
committed
Fix TypeScript compilation
Currently this is clearly suboptimal, once we learn more about TS in our projects. We can revisit ember-cli-typescript (or similar) to handle this for us automatically. Additionally, we plan embroider v2 to enable this “for free”
1 parent 2a721ec commit f7b141f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,18 @@
22

33
module.exports = {
44
name: require('./package').name,
5+
6+
treeForAddon(tree) {
7+
if (this.isDevelopingAddon()) {
8+
const {
9+
BroccoliBabelPresetTypeScript,
10+
} = require('broccoli-babel-preset-typescript'); // eslint-disable-line node/no-unpublished-require
11+
return this._super.treeForAddon.call(
12+
this,
13+
new BroccoliBabelPresetTypeScript([tree])
14+
);
15+
} else {
16+
return this._super.treeForAddon.call(this, tree);
17+
}
18+
},
519
};

0 commit comments

Comments
 (0)