Develop Secure Code
Composition
Events
Share JavaScript Code
To share JavaScript code between Lightning web components and Aura components, put the code in an ES6 module.
To share an ES6 module:
lightning:navigationItemAPI component docs. Note that lightning:navigationItemAPI is an Aura component, not an ES6 module, but to import an ES6 module, you use the same Aura syntax.The lwc-recipes repo has an lmsPublisherWebComponent module that enables communication between Lightning web components and Aura components.
Tip
See Also