I am trying to overwrite some methods from my original js file.

My original file path is:


In my file-mixin.js file I want override few things from file.js at below location:


My requirejs-config.js


var config = {
    'mixins': {
        '<Vendor>_<Theme>/js/file': {
            '<Vendor>_<Theme>/js/file-mixin': true

My file-mixin.js

], function ($) {

$.widget('mage.something', {
    _create: function () {
      // Content goes here

return $.mage.something;

The problem is, my file-mixin.js overwrites all my file.js, it looks like file-mixins.js does not inherit any thing from file.js (or don't even see file.js)

Any one know how can I fix problem with this one?

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.