How to replace a dependency when declaring a component instance?
Let's suppose that you want to replace the third-party-lib@1.0/awesome-lib-util utility with a different version (e.g. 2.0). To replace a dependency, you should exclude the old dependency and include the new desired one.
Using the TAG API (Only for a component)
You can replace the desired dependency by excluding it as above and including the desired dependency using the cubx-dependencies
and the cubx-dependency
tags as follows:
Using the Dependency API (For all components)
Similarly, you could replace the desired dependency by adding a new one and excluding an existing one using the window.cubx.CRCInit object, as shown below:
For more details check The Cubbles Dependency API.
PreviousHow to render HTML Markup coming from input slot?NextHow to synchronize multiple dataflows between component instances?
Last updated