Module preference
ScandiPWA introduces concept of module preference. This is a feature of ScandiPWA extensions.
To preference a module, set the scandipwa.preference field of package.json equal to the desired module name.
Virtual module preference
Create ScandiPWA App introduces the concept of "virtual module".
Virtual modules are useful for UI elements, where different libraries could be used as an implementation, or for an API endpoints, where the application is relying on data format, not the source of the data.
To create a virtual module, define the reference to a non existing module, and implement a preference in your extension to it. To ensure that it does not exist, use @virtual-module/<name> name for it.
Last updated