I'm trying to extend the widget in vendor/amasty/label/view/base/web/js/label.js and override a functionality in one of its methods. The error I get is:

TypeError: base is not a constructor in jquery-ui.js

These are my customizations:

  • app/code/Vendor/Module/view/base/requirejs-config.js
var config = {
    map: {
        '*': {
            'Amasty_Label/js/label': 'Vendor_Module/js/label-extend'
  • app/code/Vendor/Module/view/base/web/js/label-extend.js
], function ($) {
    $.widget('vendor.amShowLabel', $.mage.amShowLabel, {

        _init: function () {

        setLabelStyle: function() {...}

    return $.vendor.amShowLabel;

Any idea how to solve this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.