Overriding 'Magento_Catalog/js/price-box'
via mixin works in only Chrome and I can't understand why. Other jQuery widgets overriding works fine (breadcrumb, swatch-renderer)
$path-to-theme / requirejs-config.js
var config = {
config: {
mixins: {
'Magento_Catalog/js/price-box': {
'Magento_Catalog/js/custompricebox': true
},
}
}
};
$path-to-theme / Magento_Catalog/web/js/custompricebox.js
define([
'jquery',
'Magento_Catalog/js/price-utils',
'underscore',
'mage/template',
'jquery/ui'
], function ($, utils, _, mageTemplate) {
'use strict';
return function (priceBox) {
return $.widget('mage.priceBox', priceBox, {
_init: function () {
this._super();
console.log('Hello theme!');
}
});
}
});
And it's works only in Chrome. Screenshots:
Chrome:
Firefox: