Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BREAKING] Bundling: Enforce usage of sap.ui.predefine instead function wrappers #1021

Merged
merged 1 commit into from
May 28, 2024

Conversation

flovogt
Copy link
Member

@flovogt flovogt commented May 17, 2024

Up until UI5 Tooling v3, the bundle option "usePredefineCalls" defaults to "false" and has to be activated explicitly in a custom bundle configuration.
For default bundles, such as Component-preload or self-contained bundle (sap-ui-custom.js), there is no way to use the option apart from re-defining the whole bundle via custom bundle definition.

With UI5 Tooling v4 bundles are generated with the usage sap.ui.predefine calls instead of the former default function wrapper. This leads to smaller bundle sizes and less overhead at runtime.

As the option only affects the internal handling of bundling without affecting the actual users,
the option is removed completely, instead of just changing the default value of the option.

Documentation update covered in SAP/ui5-tooling#957.

JIRA: CPOUI5FOUNDATION-760

BREAKING CHANGE:
Created bundles use sap.ui.predefine instead function wrappers. For projects this is a compatible change. Only the produced bundle content changes.

@flovogt flovogt changed the title [FEATURE] Bundling: Remove option 'usePredefineCalls' [FEATURE] Bundling: Use sap.ui.predefine calls for bundling May 17, 2024
@flovogt flovogt changed the title [FEATURE] Bundling: Use sap.ui.predefine calls for bundling [FEATURE] Bundling: Use sap.ui.predefine calls May 17, 2024
@flovogt flovogt changed the title [FEATURE] Bundling: Use sap.ui.predefine calls [FEATURE] Bundling: Use sap.ui.predefine May 17, 2024
@flovogt flovogt force-pushed the remove-usePredefineCalls-option branch 2 times, most recently from 919474e to 96a3932 Compare May 21, 2024 13:07
@coveralls
Copy link

coveralls commented May 21, 2024

Coverage Status

coverage: 94.643% (-0.003%) from 94.646%
when pulling 7b88583 on remove-usePredefineCalls-option
into 2c09a11 on main.

@flovogt flovogt marked this pull request as ready for review May 21, 2024 13:14
@flovogt flovogt requested a review from a team May 21, 2024 13:14
@flovogt flovogt changed the title [FEATURE] Bundling: Use sap.ui.predefine [FEATURE] Bundling: Enforce usage of sap.ui.predefine instead function wrappers May 21, 2024
@flovogt flovogt force-pushed the remove-usePredefineCalls-option branch from 96a3932 to b335c3b Compare May 21, 2024 13:27
@flovogt flovogt force-pushed the remove-usePredefineCalls-option branch from b335c3b to 7b88583 Compare May 21, 2024 13:28
@flovogt flovogt changed the title [FEATURE] Bundling: Enforce usage of sap.ui.predefine instead function wrappers [BREAKING] Bundling: Enforce usage of sap.ui.predefine instead function wrappers May 21, 2024
Copy link
Contributor

@d3xter666 d3xter666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@flovogt flovogt requested a review from RandomByte May 27, 2024 13:16
Copy link
Member

@RandomByte RandomByte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@flovogt flovogt merged commit 4bda728 into main May 28, 2024
17 checks passed
@flovogt flovogt deleted the remove-usePredefineCalls-option branch May 28, 2024 12:26
@flovogt flovogt added this to the ui5-builder v4 milestone Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants