babel-plugin-transform-modules-ui5
babel-plugin-transform-modules-ui5 copied to clipboard
[FEATURE REQUEST] Change the architecture/lifecycle of the plugin (run in exit phase)
As mentioned by @Elberet in #23 and #25, to benefit from other plugins transformation process, the plugin should run in the Program#exit
phase. This ensures that e.g. custom code for TypeScript isn't needed to process e.g. the constructor parameter properties, or to let the decorator plugin handle them. But therefore the plugin still needs to partially run in the Program#enter
phase to collect informations about imports, custom decorators or any processing relevant information which may get lost during the transformation phase.
Hi @petermuessig,
I saw the commit and tried it out with decorators. It works. So this issue can be closed?
And big thanks for tackling this issue!
Within the re-architecture of the plugin we may also checkout how to handle circular dependencies better. Therefore we need a holistic picture of the resources - more can be found in the issue #114