sherpal / LaminarSAPUI5Bindings

Laminar bindings for the SAP ui5 web components library
MIT License
74 stars 10 forks source link

@ui5/webcomponents-localization/dist/Assets.js import needs to be JSImport.Namespace #61

Closed raquo closed 8 months ago

raquo commented 10 months ago

I'm getting this warning in Vite:

target/scala-3.3.1/client-opt/main.js (53811:76) "default" is not exported by "node_modules/@ui5/webcomponents-localization/dist/Assets.js", imported by "target/scala-3.3.1/client-opt/main.js".

I think it's caused by ui5/globals.scala importing Assets.js with JSImport.Default. But Assets.js does not export anything, not even a default, so we get this warning.

The entirety of Assets.js:

// Currently the base package provides CLDR assets only
import "./generated/json-imports/LocaleData.js";
//# sourceMappingURL=Assets.js.map

I fixed similar warnings in my own code by using JsImport.Namespace, I'm pretty sure this is the solution here too.

sherpal commented 8 months ago

Woops, Completely forgot about that. :see_no_evil:

You are right, lots of things need to change from Default to Namespace, like the Assets.js but also the illustrated messages, the calendars...

Thanks you :pray: