29
29
path . join ( __dirname , '..' , 'dist' , 'ember-template-compiler.js' )
30
30
) ;
31
31
32
+ const { addonV1Shim } = require ( '@embroider/addon-shim' ) ;
33
+
34
+ const shim = addonV1Shim ( path . join ( __dirname , '..' ) , {
35
+ autoImportCompat : {
36
+ customizeMeta ( meta ) {
37
+ return { ...meta , 'renamed-modules' : { } } ;
38
+ } ,
39
+ } ,
40
+ } ) ;
41
+
32
42
module . exports = {
43
+ ...shim ,
44
+ paths,
45
+ absolutePaths,
46
+
33
47
init ( ) {
34
- this . _super . init && this . _super . init . apply ( this , arguments ) ;
48
+ if ( shim . init ) {
49
+ shim . init . apply ( this , arguments ) ;
50
+ } else {
51
+ this . _super . init && this . _super . init . apply ( this , arguments ) ;
52
+ }
35
53
36
54
// resets `this.root` to the correct location by default ember-cli
37
55
// considers `__dirname` here to be the root, but since our main entry
@@ -43,16 +61,17 @@ module.exports = {
43
61
this . treePaths . vendor = 'dist' ;
44
62
} ,
45
63
46
- name : 'ember-source' ,
47
- paths,
48
- absolutePaths,
49
64
_overrideTree : undefined ,
50
65
51
66
// Expose supported list of browsers for reference by other packages
52
67
supportedBrowsers : SupportedBrowsers ,
53
68
54
69
included ( ) {
55
- this . _super . included . apply ( this , arguments ) ;
70
+ if ( shim . included ) {
71
+ shim . included . apply ( this , arguments ) ;
72
+ } else {
73
+ this . _super . included . apply ( this , arguments ) ;
74
+ }
56
75
57
76
let overrides = Overrides . for ( this . project ) ;
58
77
@@ -104,6 +123,9 @@ module.exports = {
104
123
} ,
105
124
106
125
treeForVendor ( tree ) {
126
+ if ( shim . treeForVendor ) {
127
+ tree = shim . treeForVendor . call ( this , tree ) ;
128
+ }
107
129
const isProduction = process . env . EMBER_ENV === 'production' ;
108
130
109
131
let templateCompiler = new Funnel ( tree , {
0 commit comments