Skip to content

Commit a6d1406

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 a6d1406

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,15 @@
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(this, new BroccoliBabelPresetTypeScript([tree]));
12+
} else {
13+
return this._super.treeForAddon.call(this, tree);
14+
}
15+
},
516
};

0 commit comments

Comments
 (0)