Open pkozuchowski opened 4 years ago
I'm going to close this issue since this has nothing to do with LWC but with the interoperability layer on the Salesforce platform with Aura to which there are other more appropriate channels for.
But before I do that, @jodarove can you take a look? Because any export should just work, sounds like either a corner case or something we team should be trivially able to fix. Modify this issue accordingly.
There is also the locker layer in here, which might be wrapping the imported namespace. cc @dgitin
Description
When LWC module exports an object (or other non function type variable) and this module is imported in Lightning Component, then exported properties are turned into something looking like a function. The value of exported variables cannot be referenced.
Steps to Reproduce
export {Constants}
Controller.js
Expected Results
Lightning Component should be able to reference exported values.
Actual Results
Lightning Component gets strange function-like item that is not usable:
Browsers Affected
All
Version
Not sure, happens on sandbox.
Possible Solution
Additional context/Screenshots The only workaround I've found for this, is to export function which will return the object.