Skip to content

Conversation

@petermuessig
Copy link
Member

@petermuessig petermuessig commented Apr 11, 2023

Standard NPM packages like jsPDF are also detected as static objects but compared to UI5 static objects they must not be returned as default.

NPM static objects:

(await import("jsPDF")); // { __esModule: true, jsPDF: /* jsPDF class */, ... }
(await import("sap/m/MessageBox")).jsPDF // jsPDF

UI5 static object:

(await import("sap/m/MessageBox")) // { __esModule: true, default: /* sap/m/MessageBox */... }
(await import("sap/m/MessageBox")).default // sap/m/MessageBox
(await import("sap/m/MessageBox")).default.alert // sap/m/MessageBox#alert

@petermuessig petermuessig merged commit b269985 into main Apr 11, 2023
@petermuessig petermuessig deleted the fix/dynamicImport branch April 11, 2023 17:36
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.

2 participants