I’ve implemented swatch-renderer-mixin
through require-js
. It’s working fine but I need to only run it when my module is enabled. What’s the best way to check it in my mixin.js
file?
This is my requirejs-config file:
var config = {
config: {
mixins: {
'Magento_Swatches/js/swatch-renderer': {
'Vendor_Module/js/swatch-renderer-mixin': true
},
'mage/gallery/gallery': {
'Vendor_Module/js/gallery-mixin': true
}
}
}
};