You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm heavily using this plugin for SAPUI5 apps. Thanks for this great plugin!
But I am thinking about how this can be adjusted even better for UI5. With UI5 we use custom AMD and custom bundling of apps.
A typical module looks like this:
The UI5 bundler works best if the first call is sap.ui.define, without any defined global variables. In this case the bundler will extract all dependencies and use this information to optimize the bundle.
But when using this plugin (even with inlineHelpers activated) some of the helpers (like _catch, _finally) get inserted on the top level, before the sap.ui.define call.
Would it be possible to insert the inline helpers directly in the function where they are used, or maybe have some kind of "target" variable/comment that determines where the helpers are to be inserted?
I'm thinking of something like this:
Alternatively I might try to use the provided helpers but I would have to convert them to use the custom AMD syntax.
My current workaround is using babel-plugin-iife-wrap in order not to have global variables in my modules, but this just removes bundler warnings about global variables; extraction of dependencies still does not work.
Thanks a lot!
The text was updated successfully, but these errors were encountered:
I suspect that transform-async-to-promises is processing the output of your custom bundling step rather than the other way around. Could you describe your bundling setup in more detail if this is still an issue for you?
Hi, I'm heavily using this plugin for SAPUI5 apps. Thanks for this great plugin!
But I am thinking about how this can be adjusted even better for UI5. With UI5 we use custom AMD and custom bundling of apps.
A typical module looks like this:
The UI5 bundler works best if the first call is
sap.ui.define
, without any defined global variables. In this case the bundler will extract all dependencies and use this information to optimize the bundle.But when using this plugin (even with
inlineHelpers
activated) some of the helpers (like_catch
,_finally
) get inserted on the top level, before thesap.ui.define
call.Would it be possible to insert the inline helpers directly in the function where they are used, or maybe have some kind of "target" variable/comment that determines where the helpers are to be inserted?
I'm thinking of something like this:
Alternatively I might try to use the provided helpers but I would have to convert them to use the custom AMD syntax.
My current workaround is using
babel-plugin-iife-wrap
in order not to have global variables in my modules, but this just removes bundler warnings about global variables; extraction of dependencies still does not work.Thanks a lot!
The text was updated successfully, but these errors were encountered: