-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
20 lines (19 loc) · 687 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* eslint-disable node/no-unpublished-require */
'use strict';
const MergeTrees = require('broccoli-merge-trees');
const ExperimentalSetRouteComponentTransform = require('./utils/experimental-set-route-component-transform.js');
module.exports = {
name: require('./package').name,
preprocessTree(kind, tree) {
if (kind === 'js') {
const routelessTree = new ExperimentalSetRouteComponentTransform([tree], {
annotation: 'experimental-set-route-component-transform',
});
return new MergeTrees([routelessTree, tree], {
annotation: 'merge-experimental-set-route-component-transform',
overwrite: true,
});
}
return tree;
},
};