embroider-build / ember-auto-import

Zero config import from npm packages
Other
361 stars 110 forks source link

fix imports analysis of gts #613

Closed patricklx closed 3 months ago

patricklx commented 3 months ago

We want to analyse imports that are dynamically added by babel plugins. We cannot use Program:exit, because amd module transform removes the imports at that time. Therefore, we add an empty statement with extra attributes at the end of the program body. When we reach it, we run the Import analysis

fixes #611

patricklx commented 3 months ago

this is too hacky, i think there are better solutions in babel plugin ember compilation