ui5-community / babel-plugin-transform-modules-ui5

A Babel transformer plugin for OpenUI5/SAPUI5. It allows you to develop UI5 applications by using the latest ECMAScript or TypeScript, including new syntax and objective oriented programming technology.
MIT License
34 stars 16 forks source link

[FEATURE REQUEST] Change the architecture/lifecycle of the plugin (run in exit phase) #101

Open petermuessig opened 1 year ago

petermuessig commented 1 year ago

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.

texttechne commented 1 year ago

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!

petermuessig commented 12 months ago

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